summaryrefslogtreecommitdiffstats
path: root/test/std/utilities/tuple
diff options
context:
space:
mode:
authorEric Fiselier <eric@efcs.ca>2016-12-14 23:24:12 +0000
committerEric Fiselier <eric@efcs.ca>2016-12-14 23:24:12 +0000
commitc480bc55cdcdb884d24fbe96cc0c29da44939186 (patch)
treeb06bc5c29c0845c3fc395ef9cf2762b33ada142d /test/std/utilities/tuple
parentbad1d6c248e95d6f3f401b70ee87306f4ce019a3 (diff)
downloadexternal_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.cpp4
-rw-r--r--test/std/utilities/tuple/tuple.tuple/tuple.cnstr/derived_from_tuple_like.pass.cpp8
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));