...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::expressions::attribute_keyword — This class implements an expression template keyword.
// In header: <boost/log/expressions/keyword_fwd.hpp> template<typename DescriptorT, template< typename > class ActorT> struct attribute_keyword { // public static functions static attribute_name get_name(); static or_none_result_type or_none(); static or_throw_result_type or_throw(); template<typename DefaultT> static attribute_actor< value_type, fallback_to_default< DefaultT >, descriptor_type, ActorT > or_default(DefaultT const &); };
This class implements an expression template keyword. It is used to start template expressions involving attribute values.
attribute_keyword
public static functionsstatic attribute_name get_name();Returns attribute name.
static or_none_result_type or_none();Generates an expression that extracts the attribute value or a default value.
static or_throw_result_type or_throw();Generates an expression that extracts the attribute value or throws an exception.
template<typename DefaultT> static attribute_actor< value_type, fallback_to_default< DefaultT >, descriptor_type, ActorT > or_default(DefaultT const & def_val);Generates an expression that extracts the attribute value or a default value.