Allocator for pointer_list
, specialized for NELT
.
More...
#include <pointer_list.h>
Public Member Functions | |
BOOST_STATIC_ASSERT (((NELT+1)&NELT)==0) | |
Verify that NELT is one less than a power of two. | |
allocator (size_t nblock=100) | |
Constructor. | |
Static Public Member Functions | |
static bool | at_end_static (const void *p) |
Test if P is pointing at the end-pointer of a block. | |
Static Public Attributes | |
static const unsigned long | END_OFFS = NELT * sizeof(value_type) |
Constants to use to test if we're at the end of a block. | |
static const unsigned long | END_MASK = END_OFFS | (sizeof(value_type)-1) |
Allocator for pointer_list
, specialized for NELT
.
The purpose for thsi is to be able to have the static at_end_static
function, which we can call from an iterator.
CxxUtils::pointer_list< NELT >::allocator::allocator | ( | size_t | nblock = 100 |
) | [inline] |
Constructor.
nblock | Number of blocks to allocate per chunk. |
bool CxxUtils::pointer_list< NELT >::allocator::at_end_static | ( | const void * | p | ) | [inline, static] |
Test if P is pointing at the end-pointer of a block.
Test to see if we're looking at the end of a block.
p | The pointer to test. |