summaryrefslogtreecommitdiff
path: root/libstdc++-v3/testsuite/ext/mt_allocator/tune-4.cc
diff options
context:
space:
mode:
authorbkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4>2004-10-28 20:46:08 +0000
committerbkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4>2004-10-28 20:46:08 +0000
commita459004d40da36467c3b16e43cacb165a8a75f89 (patch)
tree42e84384ba20cde73791c69c66e64d90df17bc78 /libstdc++-v3/testsuite/ext/mt_allocator/tune-4.cc
parentd2be3229760bcae387f6cb25324604e77f9e3769 (diff)
downloadgcc-a459004d40da36467c3b16e43cacb165a8a75f89.tar.gz
2004-10-28 Benjamin Kosnik <bkoz@redhat.com>
* include/ext/mt_allocator.h (__common_pool_policy): Add template template parameter for pool class type. (__per_type_pool_policy): Same. (__mt_allocator): Don't inherit policy. Qualify policy_type calls. * testsuite/ext/mt_allocator/check_deallocate_null.cc: Fix. * testsuite/ext/mt_allocator/check_deallocate_null_thread.cc: Same. * testsuite/ext/mt_allocator/deallocate_global-2.cc: Same. * testsuite/ext/mt_allocator/deallocate_global-4.cc: Same. * testsuite/ext/mt_allocator/deallocate_global_thread-1.cc: Same. * testsuite/ext/mt_allocator/deallocate_global_thread-3.cc: Same. * testsuite/ext/mt_allocator/deallocate_local-2.cc: Same. * testsuite/ext/mt_allocator/deallocate_local-4.cc: Same. * testsuite/ext/mt_allocator/deallocate_local_thread-1.cc: Same. * testsuite/ext/mt_allocator/deallocate_local_thread-3.cc: Same. * testsuite/ext/mt_allocator/instantiate.cc: Same. * testsuite/ext/mt_allocator/tune-1.cc: Same. * testsuite/ext/mt_allocator/tune-2.cc: Same. * testsuite/ext/mt_allocator/tune-3.cc: Same. * testsuite/ext/mt_allocator/tune-4.cc: Same. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@89776 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/testsuite/ext/mt_allocator/tune-4.cc')
-rw-r--r--libstdc++-v3/testsuite/ext/mt_allocator/tune-4.cc24
1 files changed, 14 insertions, 10 deletions
diff --git a/libstdc++-v3/testsuite/ext/mt_allocator/tune-4.cc b/libstdc++-v3/testsuite/ext/mt_allocator/tune-4.cc
index 993f7b3a52e..8e2f5119dbf 100644
--- a/libstdc++-v3/testsuite/ext/mt_allocator/tune-4.cc
+++ b/libstdc++-v3/testsuite/ext/mt_allocator/tune-4.cc
@@ -27,12 +27,16 @@ template<typename _Tp>
struct test_policy
{ static bool per_type() { return true; } };
-template<bool _Thread>
-struct test_policy<__gnu_cxx::__common_pool_policy<_Thread> >
-{
- typedef __gnu_cxx::__common_pool_policy<_Thread> policy_type;
- static bool per_type() { return false; }
-};
+using __gnu_cxx::__pool;
+using __gnu_cxx::__common_pool_policy;
+
+template<>
+struct test_policy<__common_pool_policy<__pool, true> >
+{ static bool per_type() { return false; } };
+
+template<>
+struct test_policy<__common_pool_policy<__pool, false> >
+{ static bool per_type() { return false; } };
struct pod2
{
@@ -104,11 +108,11 @@ void test04()
int main()
{
#ifdef __GTHREADS
- test04<float, __gnu_cxx::__common_pool_policy<true> >();
- test04<double, __gnu_cxx::__per_type_pool_policy<double, true> >();
+ test04<float, __gnu_cxx::__common_pool_policy<__pool, true> >();
+ test04<double, __gnu_cxx::__per_type_pool_policy<double, __pool, true> >();
#endif
- test04<float, __gnu_cxx::__common_pool_policy<false> >();
- test04<double, __gnu_cxx::__per_type_pool_policy<double, false> >();
+ test04<float, __gnu_cxx::__common_pool_policy<__pool, false> >();
+ test04<double, __gnu_cxx::__per_type_pool_policy<double, __pool, false> >();
return 0;
}