Make tuple's constructor and std::get<>(tuple) constexpr. Final stage of fixing bug #16599. Thanks to Howard for the review and updates.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@186834 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -38,4 +38,13 @@ int main()
|
||||
assert(i == 0);
|
||||
assert(j == 0);
|
||||
}
|
||||
#if _LIBCPP_STD_VER > 11
|
||||
{
|
||||
constexpr auto t1 = std::make_tuple(0, 1, 3.14);
|
||||
constexpr int i1 = std::get<1>(t1);
|
||||
constexpr double d1 = std::get<2>(t1);
|
||||
static_assert (i1 == 1, "" );
|
||||
static_assert (d1 == 3.14, "" );
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
Reference in New Issue
Block a user