modm API documentation
modm::allocator::AllocatorBase< T > Class Template Reference

#include <modm/utils/allocator.hpp>

Inheritance diagram for modm::allocator::AllocatorBase< T >:
modm::allocator::Dynamic< T >

Static Public Member Functions

static void construct (T *p, const T &value)
 
static void destroy (T *p)
 

Detailed Description

template<typename T>
class modm::allocator::AllocatorBase< T >

Base class for all allocator types

Author
Fabian Greif

Member Function Documentation

template<typename T >
static void modm::allocator::AllocatorBase< T >::construct ( T *  p,
const T &  value 
)
inlinestatic

Construct an object

Constructs an object of type T (the template parameter) on the location pointed by p using its copy constructor to initialize its value to value.

Notice that this does not allocate space for the element, it should already be available at p.

template<typename T >
static void modm::allocator::AllocatorBase< T >::destroy ( T *  p)
inlinestatic

Destroy an object

Destroys the object of type T (the template parameter) pointed by p.

Notice that this does not deallocate space for the element.


The documentation for this class was generated from the following file: