summaryrefslogtreecommitdiffstats
path: root/libcxx/test/std/utilities/tuple/tuple.tuple
diff options
context:
space:
mode:
Diffstat (limited to 'libcxx/test/std/utilities/tuple/tuple.tuple')
-rw-r--r--libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_UTypes.pass.cpp4
-rw-r--r--libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/copy.pass.cpp5
-rw-r--r--libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/move.pass.cpp1
-rw-r--r--libcxx/test/std/utilities/tuple/tuple.tuple/tuple.creation/tuple_cat.pass.cpp11
-rw-r--r--libcxx/test/std/utilities/tuple/tuple.tuple/tuple.elem/get_const.pass.cpp1
5 files changed, 18 insertions, 4 deletions
diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_UTypes.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_UTypes.pass.cpp
index 864d5b5079b..4757422cebb 100644
--- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_UTypes.pass.cpp
+++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_UTypes.pass.cpp
@@ -47,12 +47,12 @@ void test_default_constructible_extension_sfinae()
typedef std::tuple<MoveOnly, MoveOnly, NoDefault> Tuple;
static_assert(!std::is_constructible<
- std::tuple<MoveOnly, MoveOnly, NoDefault>,
+ Tuple,
std::allocator_arg_t, A1<int>, MoveOnly, MoveOnly
>::value, "");
static_assert(std::is_constructible<
- std::tuple<MoveOnly, MoveOnly, NoDefault>,
+ Tuple,
std::allocator_arg_t, A1<int>, MoveOnly, MoveOnly, NoDefault
>::value, "");
}
diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/copy.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/copy.pass.cpp
index fd953f84340..ec40a18fba6 100644
--- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/copy.pass.cpp
+++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/copy.pass.cpp
@@ -25,6 +25,7 @@ int main()
typedef std::tuple<> T;
T t0;
T t = t0;
+ ((void)t); // Prevent unused warning
}
{
typedef std::tuple<int> T;
@@ -47,7 +48,7 @@ int main()
assert(std::get<1>(t) == 'a');
assert(std::get<2>(t) == "some text");
}
-#if _LIBCPP_STD_VER > 11
+#if _LIBCPP_STD_VER > 11
{
typedef std::tuple<int> T;
constexpr T t0(2);
@@ -58,6 +59,8 @@ int main()
typedef std::tuple<Empty> T;
constexpr T t0;
constexpr T t = t0;
+ constexpr Empty e = std::get<0>(t);
+ ((void)e); // Prevent unused warning
}
#endif
}
diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/move.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/move.pass.cpp
index 60e6f7e6421..c4f2f110c77 100644
--- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/move.pass.cpp
+++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/move.pass.cpp
@@ -37,6 +37,7 @@ int main()
typedef std::tuple<> T;
T t0;
T t = std::move(t0);
+ ((void)t); // Prevent unused warning
}
{
typedef std::tuple<MoveOnly> T;
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;
diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.elem/get_const.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.elem/get_const.pass.cpp
index 0ba898d98d8..04bf5b2b9bf 100644
--- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.elem/get_const.pass.cpp
+++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.elem/get_const.pass.cpp
@@ -45,6 +45,7 @@ int main()
typedef std::tuple<Empty> T;
constexpr T t{Empty()};
constexpr Empty e = std::get<0>(t);
+ ((void)e); // Prevent unused warning
}
#endif
{
OpenPOWER on IntegriCloud