This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

test-case for allocators


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);
}

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]