Jolt Physics
A multi core friendly Game Physics Engine
Loading...
Searching...
No Matches
STLAllocator< T > Class Template Reference

STL allocator that forwards to our allocation functions. More...

#include <STLAllocator.h>

Classes

struct  rebind
 Converting to allocator for other type. More...
 

Public Types

using value_type = T
 
using pointer = T *
 Pointer to type. More...
 
using const_pointer = const T *
 
using reference = T &
 
using const_reference = const T &
 
using size_type = size_t
 
using difference_type = ptrdiff_t
 

Public Member Functions

 STLAllocator ()=default
 Constructor. More...
 
template<typename T2 >
 STLAllocator (const STLAllocator< T2 > &)
 Constructor from other allocator. More...
 
pointer allocate (size_type inN)
 Allocate memory. More...
 
void deallocate (pointer inPointer, size_type)
 Free memory. More...
 
bool operator== (const STLAllocator< T > &) const
 Allocators are stateless so assumed to be equal. More...
 
bool operator!= (const STLAllocator< T > &) const
 

Detailed Description

template<typename T>
class STLAllocator< T >

STL allocator that forwards to our allocation functions.

Member Typedef Documentation

◆ const_pointer

template<typename T >
using STLAllocator< T >::const_pointer = const T *

◆ const_reference

template<typename T >
using STLAllocator< T >::const_reference = const T &

◆ difference_type

template<typename T >
using STLAllocator< T >::difference_type = ptrdiff_t

◆ pointer

template<typename T >
using STLAllocator< T >::pointer = T *

Pointer to type.

◆ reference

template<typename T >
using STLAllocator< T >::reference = T &

Reference to type. Can be removed in C++20.

◆ size_type

template<typename T >
using STLAllocator< T >::size_type = size_t

◆ value_type

template<typename T >
using STLAllocator< T >::value_type = T

Constructor & Destructor Documentation

◆ STLAllocator() [1/2]

template<typename T >
STLAllocator< T >::STLAllocator ( )
inlinedefault

Constructor.

◆ STLAllocator() [2/2]

template<typename T >
template<typename T2 >
STLAllocator< T >::STLAllocator ( const STLAllocator< T2 > &  )
inline

Constructor from other allocator.

Member Function Documentation

◆ allocate()

template<typename T >
pointer STLAllocator< T >::allocate ( size_type  inN)
inline

Allocate memory.

◆ deallocate()

template<typename T >
void STLAllocator< T >::deallocate ( pointer  inPointer,
size_type   
)
inline

Free memory.

◆ operator!=()

template<typename T >
bool STLAllocator< T >::operator!= ( const STLAllocator< T > &  ) const
inline

◆ operator==()

template<typename T >
bool STLAllocator< T >::operator== ( const STLAllocator< T > &  ) const
inline

Allocators are stateless so assumed to be equal.


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