[libcxx] r289741 - Work around bug in initialization of std::array base class with older clangs
Eric Fiselier via cfe-commits
cfe-commits at lists.llvm.org
Wed Dec 14 15:24:12 PST 2016
Author: ericwf
Date: Wed Dec 14 17:24:12 2016
New Revision: 289741
URL: http://llvm.org/viewvc/llvm-project?rev=289741&view=rev
Log:
Work around bug in initialization of std::array base class with older clangs
Modified:
libcxx/trunk/test/std/utilities/tuple/tuple.tuple/tuple.assign/derived_from_tuple_like.pass.cpp
libcxx/trunk/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/derived_from_tuple_like.pass.cpp
Modified: libcxx/trunk/test/std/utilities/tuple/tuple.tuple/tuple.assign/derived_from_tuple_like.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/tuple/tuple.tuple/tuple.assign/derived_from_tuple_like.pass.cpp?rev=289741&r1=289740&r2=289741&view=diff
==============================================================================
--- libcxx/trunk/test/std/utilities/tuple/tuple.tuple/tuple.assign/derived_from_tuple_like.pass.cpp (original)
+++ libcxx/trunk/test/std/utilities/tuple/tuple.tuple/tuple.assign/derived_from_tuple_like.pass.cpp Wed Dec 14 17:24:12 2016
@@ -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));
Modified: libcxx/trunk/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/derived_from_tuple_like.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/derived_from_tuple_like.pass.cpp?rev=289741&r1=289740&r2=289741&view=diff
==============================================================================
--- libcxx/trunk/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/derived_from_tuple_like.pass.cpp (original)
+++ libcxx/trunk/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/derived_from_tuple_like.pass.cpp Wed Dec 14 17:24:12 2016
@@ -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));
More information about the cfe-commits
mailing list