Mēnsūra
Classes | Public Types | Public Member Functions | List of all members
Json::SecureAllocator< T > Class Template Reference

Classes

struct  rebind
 

Public Types

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

Public Member Functions

pointer allocate (size_type n)
 
void deallocate (volatile pointer p, size_type n)
 
template<typename... Args>
void construct (pointer p, Args &&...args)
 
size_type max_size () const
 
pointer address (reference x) const
 
const_pointer address (const_reference x) const
 
void destroy (pointer p)
 
template<typename U >
 SecureAllocator (const SecureAllocator< U > &)
 

Member Function Documentation

template<typename T >
pointer Json::SecureAllocator< T >::allocate ( size_type  n)
inline

Allocate memory for N items using the standard allocator.

template<typename T >
template<typename... Args>
void Json::SecureAllocator< T >::construct ( pointer  p,
Args &&...  args 
)
inline

Construct an item in-place at pointer P.

template<typename T >
void Json::SecureAllocator< T >::deallocate ( volatile pointer  p,
size_type  n 
)
inline

Release memory which was allocated for N items at pointer P.

The memory block is filled with zeroes before being released. The pointer argument is tagged as "volatile" to prevent the compiler optimizing out this critical step.

template<typename T >
void Json::SecureAllocator< T >::destroy ( pointer  p)
inline

Destroy an item in-place at pointer P.


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