Home | Libraries | People | FAQ | More |
BOOST_INTRUSIVE_OPTION_TYPE
// In header: <boost/intrusive/pack_options.hpp>
BOOST_INTRUSIVE_OPTION_TYPE(OPTION_NAME, TYPE, TYPEDEF_EXPR, TYPEDEF_NAME)
Defines an option class of name OPTION_NAME that can be used to specify a type of type TYPE...
struct OPTION_NAME<class TYPE> { unspecified_content };
...that after being combined with boost::intrusive::pack_options
, will typedef TYPE as a typedef of name TYPEDEF_NAME. Example:
//[includes and namespaces omitted for brevity] //This macro will create the following class: // template<class VoidPointer> // struct my_pointer // { unspecified_content }; BOOST_INTRUSIVE_OPTION_TYPE(my_pointer, VoidPointer, boost::remove_pointer<VoidPointer>::type, my_pointer_type) struct empty_default{}; typedef pack_options< empty_default, typename my_pointer<void*> >::type::my_pointer_type type; BOOST_STATIC_ASSERT(( boost::is_same<type, void>::value ));