Boost C++ Libraries of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards


Struct template pointer_plus_bits



// In header: <boost/intrusive/pointer_plus_bits.hpp>

template<typename Pointer, std::size_t NumBits> 
struct pointer_plus_bits {


This is class that is supposed to have static methods to embed extra bits of information in a pointer. This is a declaration and there is no default implementation, because operations to embed the bits change with every pointer type.

An implementation that detects that a pointer type whose has_pointer_plus_bits<>::value is non-zero can make use of these operations to embed the bits in the pointer.