From 53a420fba21cf1644972b34dcd811a43cdb8368d Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Mon, 2 Jan 2017 19:18:58 +0000 Subject: Vendor import of libc++ trunk r290819: https://llvm.org/svn/llvm-project/libcxx/trunk@290819 --- .../tuple/tuple.tuple/tuple.cnstr/const_pair.pass.cpp | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'test/std/utilities/tuple/tuple.tuple/tuple.cnstr/const_pair.pass.cpp') diff --git a/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/const_pair.pass.cpp b/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/const_pair.pass.cpp index d6d489fd0ea4..bed161a3dcef 100644 --- a/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/const_pair.pass.cpp +++ b/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/const_pair.pass.cpp @@ -19,23 +19,25 @@ #include #include +#include "test_macros.h" + int main() { { - typedef std::pair T0; - typedef std::tuple T1; - T0 t0(2.5, 'a'); + typedef std::pair T0; + typedef std::tuple T1; + T0 t0(2, 'a'); T1 t1 = t0; assert(std::get<0>(t1) == 2); assert(std::get<1>(t1) == short('a')); } -#if _LIBCPP_STD_VER > 11 +#if TEST_STD_VER > 11 { - typedef std::pair P0; - typedef std::tuple T1; - constexpr P0 p0(2.5, 'a'); + typedef std::pair P0; + typedef std::tuple T1; + constexpr P0 p0(2, 'a'); constexpr T1 t1 = p0; - static_assert(std::get<0>(t1) != std::get<0>(p0), ""); + static_assert(std::get<0>(t1) == std::get<0>(p0), ""); static_assert(std::get<1>(t1) == std::get<1>(p0), ""); static_assert(std::get<0>(t1) == 2, ""); static_assert(std::get<1>(t1) == short('a'), ""); -- cgit v1.2.3