Boost C++ Libraries

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

This is the documentation for an old version of boost. Click here for the latest Boost documentation.
PrevUpHomeNext

Struct template pointer_plus_bit<T *>

boost::intrusive::pointer_plus_bit<T *>

Synopsis

template<typename T> 
struct pointer_plus_bit<T *> {
  // types
  typedef T * pointer;

  // public static functions
  static pointer get_pointer(pointer) ;
  static void set_pointer(pointer &, pointer) ;
  static bool get_bit(pointer) ;
  static void set_bit(pointer &, bool) ;
};

Description

This is the specialization to embed an extra bit of information in a raw pointer. The extra bit is stored in the lower bit of the pointer.

pointer_plus_bit public static functions

  1. static pointer get_pointer(pointer n) ;
  2. static void set_pointer(pointer & n, pointer p) ;
  3. static bool get_bit(pointer n) ;
  4. static void set_bit(pointer & n, bool c) ;

PrevUpHomeNext