...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
boost::log::result_of::extract_or_default — A metafunction that allows to acquire the result of the value extraction.
// In header: <boost/log/attributes/value_extraction.hpp> template<typename T, typename DefaultT, typename TagT> struct extract_or_default { // types typedef mpl::eval_if< mpl::is_sequence< T >, mpl::eval_if< mpl::contains< T, DefaultT >, mpl::identity< T >, mpl::push_back< T, DefaultT > >, mpl::if_< is_same< T, DefaultT >, T, mpl::vector2< T, DefaultT > > >::type extracted_type; typedef mpl::if_< mpl::is_sequence< extracted_type >, value_ref< extracted_type, TagT >, extracted_typeconst & >::type type; };