Home | Libraries | People | FAQ | More |
BOOST_INTRUSIVE_OPTION_CONSTANT
// In header: <boost/intrusive/pack_options.hpp>
BOOST_INTRUSIVE_OPTION_CONSTANT(OPTION_NAME, TYPE, VALUE, CONSTANT_NAME)
Defines an option class of name OPTION_NAME that can be used to specify a constant of type TYPE with value VALUE...
struct OPTION_NAME<TYPE VALUE> { unspecified_content };
...that after being combined with boost::intrusive::pack_options
, will contain a CONSTANT_NAME static constant of value VALUE. Example:
//[includes and namespaces omitted for brevity] //This macro will create the following class: // template<bool Enabled> // struct incremental // { unspecified_content }; BOOST_INTRUSIVE_OPTION_CONSTANT(incremental, bool, Enabled, is_incremental) struct empty_default{}; const bool is_incremental = pack_options< empty_default, incremental<true> >::type::is_incremental; BOOST_STATIC_ASSERT(( is_incremental == true ));