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

Click here to view the latest version of this page.

Struct template cache_begin



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

template<bool Enabled> 
struct cache_begin {
  // member classes/structs/unions

  // @ template<class Base>

  struct pack {
    static const bool cache_begin;


This option setter specifies if the container will cache a pointer to the first non-empty bucket so that begin() is always constant-time. This is specially helpful when we can have containers with a few elements but with big bucket arrays (that is, hashtables with low load factors).