Template Class TypedAllocator

Class Documentation

template<typename T>
class umpire::TypedAllocator

Allocator for objects of type T.

This class is an adaptor that allows using an Allocator to allocate objects of type T. You can use this class as an allocator for STL containers like std::vector.

Public Types

typedef T value_type

Public Functions

TypedAllocator(Allocator allocator)

Construct a new TypedAllocator that will use allocator to allocate data.

  • allocator: Allocator to use for allocating memory.

template<typename U>
TypedAllocator(const TypedAllocator<U> &other)
T *allocate(std::size_t size)
void deallocate(T *ptr, std::size_t size)

Deallocate ptr, the passed size is ignored.

  • ptr: Pointer to deallocate

  • size: Size of allocation (ignored).


friend class TypedAllocator