Restore previous behaviour of test
Go back to using CopyConsOnlyType as before r265485, because it works again now. Add test using DelAnyAssign for completeness and additional coverage. * testsuite/23_containers/vector/modifiers/push_back/49836.cc: Restore use of CopyConsOnlyType, but also test DelAnyAssign for completeness. From-SVN: r268539
This commit is contained in:
parent
258bd1d63a
commit
39bc6f8752
|
@ -1,5 +1,8 @@
|
||||||
2019-02-05 Jonathan Wakely <jwakely@redhat.com>
|
2019-02-05 Jonathan Wakely <jwakely@redhat.com>
|
||||||
|
|
||||||
|
* testsuite/23_containers/vector/modifiers/push_back/49836.cc: Restore
|
||||||
|
use of CopyConsOnlyType, but also test DelAnyAssign for completeness.
|
||||||
|
|
||||||
PR libstdc++/89130
|
PR libstdc++/89130
|
||||||
* include/bits/alloc_traits.h (__is_copy_insertable_impl): Rename to
|
* include/bits/alloc_traits.h (__is_copy_insertable_impl): Rename to
|
||||||
__is_alloc_insertable_impl. Replace single type member with two
|
__is_alloc_insertable_impl. Replace single type member with two
|
||||||
|
|
|
@ -24,11 +24,12 @@
|
||||||
// libstdc++/49836
|
// libstdc++/49836
|
||||||
void test01()
|
void test01()
|
||||||
{
|
{
|
||||||
using __gnu_test::assign::DelAnyAssign;
|
using __gnu_test::CopyConsOnlyType;
|
||||||
using __gnu_test::MoveConsOnlyType;
|
using __gnu_test::MoveConsOnlyType;
|
||||||
|
using __gnu_test::assign::DelAnyAssign;
|
||||||
|
|
||||||
std::vector<DelAnyAssign> v1;
|
std::vector<CopyConsOnlyType> v1;
|
||||||
DelAnyAssign t1;
|
CopyConsOnlyType t1(1);
|
||||||
v1.push_back(t1);
|
v1.push_back(t1);
|
||||||
v1.push_back(t1);
|
v1.push_back(t1);
|
||||||
v1.push_back(t1);
|
v1.push_back(t1);
|
||||||
|
@ -40,6 +41,14 @@ void test01()
|
||||||
v2.push_back(std::move(t2));
|
v2.push_back(std::move(t2));
|
||||||
v2.push_back(std::move(t2));
|
v2.push_back(std::move(t2));
|
||||||
VERIFY( v2.size() == 3 );
|
VERIFY( v2.size() == 3 );
|
||||||
|
|
||||||
|
std::vector<DelAnyAssign> v3;
|
||||||
|
DelAnyAssign t3;
|
||||||
|
v3.push_back(t3);
|
||||||
|
v3.push_back(t3);
|
||||||
|
v3.push_back(t3);
|
||||||
|
VERIFY( v3.size() == 3 );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
|
|
Loading…
Reference in New Issue