Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext

Struct template power_2_buckets

boost::intrusive::power_2_buckets

Synopsis

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

template<bool Enabled> 
struct power_2_buckets {
};

Description

This option setter specifies if the bucket array will be always power of two. This allows using masks instead of the default modulo operation to determine the bucket number from the hash value, leading to better performance. In debug mode, if power of two buckets mode is activated, the bucket length will be checked to through assertions to assure the bucket length is power of two.


PrevUpHomeNext