Blender V5.0
GuardedAllocator< T > Class Template Reference

#include <guarded_allocator.h>

Classes

struct  rebind

Public Types

using size_type = size_t
using difference_type = ptrdiff_t
using pointer = T *
using const_pointer = const T *
using reference = T &
using const_reference = const T &
using value_type = T

Public Member Functions

 GuardedAllocator ()=default
 GuardedAllocator (const GuardedAllocator &)=default
Tallocate (const size_t n, const void *hint=nullptr)
void deallocate (T *p, const size_t n)
Taddress (T &x) const
const Taddress (const T &x) const
GuardedAllocator< T > & operator= (const GuardedAllocator &)=default
size_t max_size () const
template<class U>
 GuardedAllocator (const GuardedAllocator< U > &)
template<class U>
GuardedAllocatoroperator= (const GuardedAllocator< U > &)
bool operator== (const GuardedAllocator &) const
bool operator!= (const GuardedAllocator &other) const

Detailed Description

template<typename T>
class GuardedAllocator< T >

Definition at line 22 of file guarded_allocator.h.

Member Typedef Documentation

◆ const_pointer

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

Definition at line 27 of file guarded_allocator.h.

◆ const_reference

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

Definition at line 29 of file guarded_allocator.h.

◆ difference_type

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

Definition at line 25 of file guarded_allocator.h.

◆ pointer

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

Definition at line 26 of file guarded_allocator.h.

◆ reference

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

Definition at line 28 of file guarded_allocator.h.

◆ size_type

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

Definition at line 24 of file guarded_allocator.h.

◆ value_type

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

Definition at line 30 of file guarded_allocator.h.

Constructor & Destructor Documentation

◆ GuardedAllocator() [1/3]

template<typename T>
GuardedAllocator< T >::GuardedAllocator ( )
default

◆ GuardedAllocator() [2/3]

template<typename T>
GuardedAllocator< T >::GuardedAllocator ( const GuardedAllocator< T > & )
default

◆ GuardedAllocator() [3/3]

template<typename T>
template<class U>
GuardedAllocator< T >::GuardedAllocator ( const GuardedAllocator< U > & )
inline

Definition at line 93 of file guarded_allocator.h.

Member Function Documentation

◆ address() [1/2]

template<typename T>
const T * GuardedAllocator< T >::address ( const T & x) const
inline

Definition at line 77 of file guarded_allocator.h.

◆ address() [2/2]

template<typename T>
T * GuardedAllocator< T >::address ( T & x) const
inline

Definition at line 72 of file guarded_allocator.h.

◆ allocate()

template<typename T>
T * GuardedAllocator< T >::allocate ( const size_t n,
const void * hint = nullptr )
inline

Definition at line 35 of file guarded_allocator.h.

◆ deallocate()

template<typename T>
void GuardedAllocator< T >::deallocate ( T * p,
const size_t n )
inline

Definition at line 60 of file guarded_allocator.h.

◆ max_size()

template<typename T>
size_t GuardedAllocator< T >::max_size ( ) const
inline

Definition at line 84 of file guarded_allocator.h.

◆ operator!=()

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

Definition at line 104 of file guarded_allocator.h.

◆ operator=() [1/2]

template<typename T>
GuardedAllocator< T > & GuardedAllocator< T >::operator= ( const GuardedAllocator< T > & )
default

◆ operator=() [2/2]

template<typename T>
template<class U>
GuardedAllocator & GuardedAllocator< T >::operator= ( const GuardedAllocator< U > & )
inline

Definition at line 95 of file guarded_allocator.h.

◆ operator==()

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

Definition at line 100 of file guarded_allocator.h.

Referenced by GuardedAllocator< U >::operator!=().


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