Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of Boost. Click here to view this page for the latest version.
PrevUpHomeNext

Struct template attribute_keyword

boost::log::expressions::attribute_keyword — This class implements an expression template keyword.

Synopsis

// 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 &);
};

Description

This class implements an expression template keyword. It is used to start template expressions involving attribute values.

attribute_keyword public static functions

  1. static attribute_name get_name();
    Returns attribute name.
  2. static or_none_result_type or_none();
    Generates an expression that extracts the attribute value or a default value.
  3. static or_throw_result_type or_throw();
    Generates an expression that extracts the attribute value or throws an exception.
  4. 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.

PrevUpHomeNext