From: Jonathan Wakely Date: Wed, 25 Jun 2014 23:05:58 +0000 (+0100) Subject: alloc.cc: Fix use of test allocator. X-Git-Tag: releases/gcc-5.1.0~6658 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6ab0d680e7f63aa467a3806077a757be28af694d;p=thirdparty%2Fgcc.git alloc.cc: Fix use of test allocator. * testsuite/20_util/shared_ptr/creation/alloc.cc: Fix use of test allocator. * testsuite/20_util/shared_ptr/creation/no_rtti.cc: Likewise. * testsuite/30_threads/promise/cons/alloc.cc: Likewise. From-SVN: r212003 --- diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 31669e0cc3c4..7b6c2413f00f 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -25,6 +25,11 @@ with fancy pointer. * testsuite/30_threads/promise/cons/alloc.cc: Likewise. + * testsuite/20_util/shared_ptr/creation/alloc.cc: Fix use of test + allocator. + * testsuite/20_util/shared_ptr/creation/no_rtti.cc: Likewise. + * testsuite/30_threads/promise/cons/alloc.cc: Likewise. + 2014-06-24 Jonathan Wakely * include/bits/functexcept.h (__throw_out_of_range_fmt): Change diff --git a/libstdc++-v3/testsuite/20_util/shared_ptr/creation/alloc.cc b/libstdc++-v3/testsuite/20_util/shared_ptr/creation/alloc.cc index 402c612f592b..0628807019ae 100644 --- a/libstdc++-v3/testsuite/20_util/shared_ptr/creation/alloc.cc +++ b/libstdc++-v3/testsuite/20_util/shared_ptr/creation/alloc.cc @@ -101,16 +101,10 @@ test02() == tracker_allocator_counter::get_deallocation_count() ); } -template - struct Pointer : __gnu_test::PointerBase, T> - { - using __gnu_test::PointerBase, T>::PointerBase; - }; - void test03() { - __gnu_test::CustomPointerAlloc> alloc; + __gnu_test::CustomPointerAlloc alloc; auto p = std::allocate_shared(alloc, 1); VERIFY( *p == 1 ); } diff --git a/libstdc++-v3/testsuite/20_util/shared_ptr/creation/no_rtti.cc b/libstdc++-v3/testsuite/20_util/shared_ptr/creation/no_rtti.cc index 127bafb3294b..d1fab6cf969f 100644 --- a/libstdc++-v3/testsuite/20_util/shared_ptr/creation/no_rtti.cc +++ b/libstdc++-v3/testsuite/20_util/shared_ptr/creation/no_rtti.cc @@ -29,13 +29,7 @@ struct X { }; // test allocate_shared with no RTTI -template - struct Pointer : __gnu_test::PointerBase, T> - { - using __gnu_test::PointerBase, T>::PointerBase; - }; - -__gnu_test::CustomPointerAlloc> alloc; +__gnu_test::CustomPointerAlloc alloc; auto p = std::allocate_shared(alloc); diff --git a/libstdc++-v3/testsuite/30_threads/promise/cons/alloc.cc b/libstdc++-v3/testsuite/30_threads/promise/cons/alloc.cc index c45e646aae0d..ea9bb1a16ca3 100644 --- a/libstdc++-v3/testsuite/30_threads/promise/cons/alloc.cc +++ b/libstdc++-v3/testsuite/30_threads/promise/cons/alloc.cc @@ -38,16 +38,9 @@ void test01() VERIFY( p1.get_future().get() == 5 ); } -template - struct Pointer : __gnu_test::PointerBase, T> - { - using __gnu_test::PointerBase, T>::PointerBase; - }; - -void -test02() +void test02() { - __gnu_test::CustomPointerAlloc> alloc; + __gnu_test::CustomPointerAlloc alloc; promise p1(allocator_arg, alloc); p1.set_value(5); VERIFY( p1.get_future().get() == 5 );