Fabcoin Core
0.16.2
P2P Digital Currency
|
Base class for all allocators used by SecBlock. More...
#include <secblock.h>
Public Types | |
typedef T | value_type |
typedef size_t | size_type |
typedef std::ptrdiff_t | difference_type |
typedef T * | pointer |
typedef const T * | const_pointer |
typedef T & | reference |
typedef const T & | const_reference |
Public Member Functions | |
pointer | address (reference r) const |
const_pointer | address (const_reference r) const |
void | construct (pointer p, const T &val) |
void | destroy (pointer p) |
CRYPTOPP_CONSTEXPR size_type | max_size () const |
Returns the maximum number of elements the allocator can provide. More... | |
Static Protected Member Functions | |
static void | CheckSize (size_t size) |
Verifies the allocator can satisfy a request based on size. More... | |
Base class for all allocators used by SecBlock.
T | the class or type |
Definition at line 29 of file secblock.h.
typedef const T* AllocatorBase< T >::const_pointer |
Definition at line 40 of file secblock.h.
typedef const T& AllocatorBase< T >::const_reference |
Definition at line 42 of file secblock.h.
typedef std::ptrdiff_t AllocatorBase< T >::difference_type |
Definition at line 37 of file secblock.h.
typedef T* AllocatorBase< T >::pointer |
Definition at line 39 of file secblock.h.
typedef T& AllocatorBase< T >::reference |
Definition at line 41 of file secblock.h.
typedef size_t AllocatorBase< T >::size_type |
Definition at line 33 of file secblock.h.
typedef T AllocatorBase< T >::value_type |
Definition at line 32 of file secblock.h.
|
inline |
Definition at line 44 of file secblock.h.
|
inline |
Definition at line 45 of file secblock.h.
|
inlinestaticprotected |
Verifies the allocator can satisfy a request based on size.
size | the size of the allocation, in elements |
InvalidArgument |
CheckSize verifies the number of elements requested is valid.
If size is greater than max_size(), then InvalidArgument is thrown. The library throws InvalidArgument if the size is too large to satisfy.
Internally, preprocessor macros are used rather than std::numeric_limits because the latter is not a constexpr. Some compilers, like Clang, do not optimize it well under all circumstances. Compilers like GCC, ICC and MSVC appear to optimize it well in either form.
Definition at line 91 of file secblock.h.
|
inline |
Definition at line 46 of file secblock.h.
|
inline |
Definition at line 47 of file secblock.h.
|
inline |
Returns the maximum number of elements the allocator can provide.
Internally, preprocessor macros are used rather than std::numeric_limits because the latter is not a constexpr. Some compilers, like Clang, do not optimize it well under all circumstances. Compilers like GCC, ICC and MSVC appear to optimize it well in either form.
Definition at line 55 of file secblock.h.