diff options
Diffstat (limited to 'libcxx/test/std/utilities/tuple/tuple.tuple/tuple.creation')
-rw-r--r-- | libcxx/test/std/utilities/tuple/tuple.tuple/tuple.creation/tuple_cat.pass.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.creation/tuple_cat.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.creation/tuple_cat.pass.cpp index d1e2ce3ca95..3c5a8426331 100644 --- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.creation/tuple_cat.pass.cpp +++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.creation/tuple_cat.pass.cpp @@ -25,16 +25,20 @@ int main() { { std::tuple<> t = std::tuple_cat(); + ((void)t); // Prevent unused warning } { std::tuple<> t1; std::tuple<> t2 = std::tuple_cat(t1); + ((void)t2); // Prevent unused warning } { std::tuple<> t = std::tuple_cat(std::tuple<>()); + ((void)t); // Prevent unused warning } { std::tuple<> t = std::tuple_cat(std::array<int, 0>()); + ((void)t); // Prevent unused warning } { std::tuple<int> t1(1); @@ -42,19 +46,23 @@ int main() assert(std::get<0>(t) == 1); } -#if _LIBCPP_STD_VER > 11 +#if _LIBCPP_STD_VER > 11 { constexpr std::tuple<> t = std::tuple_cat(); + ((void)t); // Prevent unused warning } { constexpr std::tuple<> t1; constexpr std::tuple<> t2 = std::tuple_cat(t1); + ((void)t2); // Prevent unused warning } { constexpr std::tuple<> t = std::tuple_cat(std::tuple<>()); + ((void)t); // Prevent unused warning } { constexpr std::tuple<> t = std::tuple_cat(std::array<int, 0>()); + ((void)t); // Prevent unused warning } { constexpr std::tuple<int> t1(1); @@ -90,6 +98,7 @@ int main() std::tuple<> t1; std::tuple<> t2; std::tuple<> t3 = std::tuple_cat(t1, t2); + ((void)t3); // Prevent unused warning } { std::tuple<> t1; |