This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
test-case for allocators
- From: Dhruv Matani <dhruvbird at gmx dot net>
- To: libstdc++ <libstdc++ at gcc dot gnu dot org>
- Date: 20 Oct 2004 21:52:21 +0530
- Subject: test-case for allocators
- Organization:
Hello,
This test-case tests the existence of the 2nd parameter for the
allocate function for the allocators.
I could not find any such thing in the testsuite. If I haven't noticed
it, I'm sorry for the duplicate.
--
-Dhruv Matani.
http://www.geocities.com/dhruvbird/
The price of freedom is responsibility, but it's a bargain, because
freedom is priceless. ~ Hugh Downs
#include <memory>
#include <ext/bitmap_allocator.h>
#include <ext/mt_allocator.h>
#include <ext/pool_allocator.h>
#include <ext/new_allocator.h>
int
main()
{
using namespace __gnu_cxx;
using namespace std;
allocator<int> a1;
bitmap_allocator<int> a2;
__mt_alloc<int> a3;
__pool_alloc<int> a4;
new_allocator<int> a5;
a1.allocate(1, 0);
a2.allocate(1, 0);
a3.allocate(1, 0);
a4.allocate(1, 0);
a5.allocate(1, 0);
}