Make tuple's constructor and std::get<>(tuple) constexpr. Final stage of fixing bug #16599. Thanks to Howard for the review and updates.
llvm-svn: 186834
diff --git a/libcxx/test/utilities/tuple/tuple.tuple/tuple.rel/lt.pass.cpp b/libcxx/test/utilities/tuple/tuple.tuple/tuple.rel/lt.pass.cpp
index dcefa17..f09a105 100644
--- a/libcxx/test/utilities/tuple/tuple.tuple/tuple.rel/lt.pass.cpp
+++ b/libcxx/test/utilities/tuple/tuple.tuple/tuple.rel/lt.pass.cpp
@@ -193,4 +193,16 @@
assert(!(t1 > t2));
assert(!(t1 >= t2));
}
+#if _LIBCPP_STD_VER > 11
+ {
+ typedef std::tuple<char, int, double> T1;
+ typedef std::tuple<double, char, int> T2;
+ constexpr T1 t1(1, 2, 3);
+ constexpr T2 t2(1, 2, 4);
+ static_assert( (t1 < t2), "");
+ static_assert( (t1 <= t2), "");
+ static_assert(!(t1 > t2), "");
+ static_assert(!(t1 >= t2), "");
+ }
+#endif
}