diff options
Diffstat (limited to 'test/std/utilities/tuple/tuple.tuple/tuple.cnstr/convert_copy.pass.cpp')
| -rw-r--r-- | test/std/utilities/tuple/tuple.tuple/tuple.cnstr/convert_copy.pass.cpp | 40 |
1 files changed, 21 insertions, 19 deletions
diff --git a/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/convert_copy.pass.cpp b/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/convert_copy.pass.cpp index b7fa2e3a03cc..4609b042556b 100644 --- a/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/convert_copy.pass.cpp +++ b/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/convert_copy.pass.cpp @@ -20,6 +20,8 @@ #include <string> #include <cassert> +#include "test_macros.h" + struct Explicit { int value; explicit Explicit(int x) : value(x) {} @@ -43,7 +45,7 @@ struct D explicit D(int i) : B(i) {} }; -#if _LIBCPP_STD_VER > 11 +#if TEST_STD_VER > 11 struct A { @@ -66,17 +68,17 @@ struct C int main() { { - typedef std::tuple<double> T0; - typedef std::tuple<int> T1; - T0 t0(2.5); + typedef std::tuple<long> T0; + typedef std::tuple<long long> T1; + T0 t0(2); T1 t1 = t0; assert(std::get<0>(t1) == 2); } -#if _LIBCPP_STD_VER > 11 +#if TEST_STD_VER > 11 { - typedef std::tuple<double> T0; + typedef std::tuple<int> T0; typedef std::tuple<A> T1; - constexpr T0 t0(2.5); + constexpr T0 t0(2); constexpr T1 t1 = t0; static_assert(std::get<0>(t1) == 2, ""); } @@ -89,17 +91,17 @@ int main() } #endif { - typedef std::tuple<double, char> T0; - typedef std::tuple<int, int> T1; - T0 t0(2.5, 'a'); + typedef std::tuple<long, char> T0; + typedef std::tuple<long long, int> T1; + T0 t0(2, 'a'); T1 t1 = t0; assert(std::get<0>(t1) == 2); assert(std::get<1>(t1) == int('a')); } { - typedef std::tuple<double, char, D> T0; - typedef std::tuple<int, int, B> T1; - T0 t0(2.5, 'a', D(3)); + typedef std::tuple<long, char, D> T0; + typedef std::tuple<long long, int, B> T1; + T0 t0(2, 'a', D(3)); T1 t1 = t0; assert(std::get<0>(t1) == 2); assert(std::get<1>(t1) == int('a')); @@ -107,9 +109,9 @@ int main() } { D d(3); - typedef std::tuple<double, char, D&> T0; - typedef std::tuple<int, int, B&> T1; - T0 t0(2.5, 'a', d); + typedef std::tuple<long, char, D&> T0; + typedef std::tuple<long long, int, B&> T1; + T0 t0(2, 'a', d); T1 t1 = t0; d.id_ = 2; assert(std::get<0>(t1) == 2); @@ -117,9 +119,9 @@ int main() assert(std::get<2>(t1).id_ == 2); } { - typedef std::tuple<double, char, int> T0; - typedef std::tuple<int, int, B> T1; - T0 t0(2.5, 'a', 3); + typedef std::tuple<long, char, int> T0; + typedef std::tuple<long long, int, B> T1; + T0 t0(2, 'a', 3); T1 t1(t0); assert(std::get<0>(t1) == 2); assert(std::get<1>(t1) == int('a')); |
