30 namespace astrotypes {
53 const std::size_t size =
sizeof(std::vector<int, PointerAllocator<int>>);
54 int * array =
new int [size];
56 std::vector<int, PointerAllocator<int>> allocated_vector(pointer_allocator);
58 for ( std::size_t i = 0; i < size; i++ ) {
59 allocated_vector.push_back(i);
61 for ( std::size_t i = 0; i < size; i++ ) {
62 ASSERT_EQ(i, array[i]);
Dummy allocator that stores a pointer to a previously allocated area of memory.
TEST(PointerAllocatorTest, test_std_vector)