diff options
author | Eric Fiselier <eric@efcs.ca> | 2016-12-14 23:24:12 +0000 |
---|---|---|
committer | Eric Fiselier <eric@efcs.ca> | 2016-12-14 23:24:12 +0000 |
commit | c480bc55cdcdb884d24fbe96cc0c29da44939186 (patch) | |
tree | b06bc5c29c0845c3fc395ef9cf2762b33ada142d /test/std/utilities/tuple | |
parent | bad1d6c248e95d6f3f401b70ee87306f4ce019a3 (diff) | |
download | external_libcxx-c480bc55cdcdb884d24fbe96cc0c29da44939186.tar.gz external_libcxx-c480bc55cdcdb884d24fbe96cc0c29da44939186.tar.bz2 external_libcxx-c480bc55cdcdb884d24fbe96cc0c29da44939186.zip |
Work around bug in initialization of std::array base class with older clangs
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@289741 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/std/utilities/tuple')
-rw-r--r-- | test/std/utilities/tuple/tuple.tuple/tuple.assign/derived_from_tuple_like.pass.cpp | 4 | ||||
-rw-r--r-- | test/std/utilities/tuple/tuple.tuple/tuple.cnstr/derived_from_tuple_like.pass.cpp | 8 |
2 files changed, 9 insertions, 3 deletions
diff --git a/test/std/utilities/tuple/tuple.tuple/tuple.assign/derived_from_tuple_like.pass.cpp b/test/std/utilities/tuple/tuple.tuple/tuple.assign/derived_from_tuple_like.pass.cpp index 82bb89843..c9496d0b5 100644 --- a/test/std/utilities/tuple/tuple.tuple/tuple.assign/derived_from_tuple_like.pass.cpp +++ b/test/std/utilities/tuple/tuple.tuple/tuple.assign/derived_from_tuple_like.pass.cpp @@ -95,7 +95,9 @@ void do_derived_assign_test() { } reset(); { - DerivedFromTup<std::array<int, 2>> d = {{{42, 101}}}; + DerivedFromTup<std::array<int, 2>> d; + d[0] = 42; + d[1] = 101; t = ValueCategoryCast<VC>(d); assert(std::get<0>(t) == 42); assert(std::get<1>(t).checkAssign(101, VC)); diff --git a/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/derived_from_tuple_like.pass.cpp b/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/derived_from_tuple_like.pass.cpp index 233a30881..53b1e3029 100644 --- a/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/derived_from_tuple_like.pass.cpp +++ b/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/derived_from_tuple_like.pass.cpp @@ -103,7 +103,9 @@ void do_derived_construct_test() { assert(std::get<1>(t).checkConstruct(101, VC)); } { - DerivedFromTup<std::array<int, 2>> d = {{{42, 101}}}; + DerivedFromTup<std::array<int, 2>> d; + d[0] = 42; + d[1] = 101; Tup1 t = ValueCategoryCast<VC>(d); assert(std::get<0>(t) == 42); assert(std::get<1>(t).checkConstruct(101, VC)); @@ -132,7 +134,9 @@ void do_derived_construct_test() { using D = DerivedFromTup<std::array<int, 2>>; static_assert(!std::is_convertible<ApplyValueCategoryT<VC, D>, Tup2>::value, ""); - D d = {{{42, 101}}}; + D d; + d[0] = 42; + d[1] = 101; Tup2 t(ValueCategoryCast<VC>(d)); assert(std::get<0>(t) == 42); assert(std::get<1>(t).checkConstruct(101, VC)); |