From 7cd166cdcc4ca84802fb2e5070037753f6fa3894 Mon Sep 17 00:00:00 2001 From: Eric Fiselier Date: Wed, 14 Dec 2016 23:24:12 +0000 Subject: [PATCH] Work around bug in initialization of std::array base class with older clangs llvm-svn: 289741 --- .../tuple.tuple/tuple.assign/derived_from_tuple_like.pass.cpp | 4 +++- .../tuple.tuple/tuple.cnstr/derived_from_tuple_like.pass.cpp | 8 ++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.assign/derived_from_tuple_like.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.assign/derived_from_tuple_like.pass.cpp index 82bb898..c9496d0 100644 --- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.assign/derived_from_tuple_like.pass.cpp +++ b/libcxx/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> d = {{{42, 101}}}; + DerivedFromTup> d; + d[0] = 42; + d[1] = 101; t = ValueCategoryCast(d); assert(std::get<0>(t) == 42); assert(std::get<1>(t).checkAssign(101, VC)); diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/derived_from_tuple_like.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/derived_from_tuple_like.pass.cpp index 233a308..53b1e30 100644 --- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/derived_from_tuple_like.pass.cpp +++ b/libcxx/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> d = {{{42, 101}}}; + DerivedFromTup> d; + d[0] = 42; + d[1] = 101; Tup1 t = ValueCategoryCast(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>; static_assert(!std::is_convertible, Tup2>::value, ""); - D d = {{{42, 101}}}; + D d; + d[0] = 42; + d[1] = 101; Tup2 t(ValueCategoryCast(d)); assert(std::get<0>(t) == 42); assert(std::get<1>(t).checkConstruct(101, VC)); -- 2.7.4