mirror of
https://github.com/darlinghq/darling-libcxx.git
synced 2024-11-24 04:19:48 +00:00
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
This commit is contained in:
parent
bad1d6c248
commit
c480bc55cd
@ -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));
|
||||
|
@ -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));
|
||||
|
Loading…
Reference in New Issue
Block a user