Data Structures | Public Types | Public Member Functions
Json::SecureAllocator< T > Class Template Reference

#include <json.h>

Data Structures

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)
 
 SecureAllocator ()
 
template<typename U >
 SecureAllocator (const SecureAllocator< U > &)
 

Member Typedef Documentation

template<typename T >
using Json::SecureAllocator< T >::const_pointer = const T*
template<typename T >
using Json::SecureAllocator< T >::const_reference = const T&
template<typename T >
using Json::SecureAllocator< T >::difference_type = std::ptrdiff_t
template<typename T >
using Json::SecureAllocator< T >::pointer = T*
template<typename T >
using Json::SecureAllocator< T >::reference = T&
template<typename T >
using Json::SecureAllocator< T >::size_type = std::size_t
template<typename T >
using Json::SecureAllocator< T >::value_type = T

Constructor & Destructor Documentation

template<typename T >
Json::SecureAllocator< T >::SecureAllocator ( )
inline
template<typename T >
template<typename U >
Json::SecureAllocator< T >::SecureAllocator ( const SecureAllocator< U > &  )
inline

Member Function Documentation

template<typename T >
pointer Json::SecureAllocator< T >::address ( reference  x) const
inline
template<typename T >
const_pointer Json::SecureAllocator< T >::address ( const_reference  x) const
inline
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.

template<typename T >
size_type Json::SecureAllocator< T >::max_size ( ) const
inline

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