## Struct template attribute_keyword

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

## Synopsis

    // In header: <boost/log/expressions/keyword.hpp>

    template<typename DescriptorT, template< typename > class ActorT>
    struct attribute_keyword {
      // types
      typedef attribute_keyword                                                         this_type;             // Self type.
      typedef DescriptorT                                                               descriptor_type;       // Attribute descriptor type.
      typedef descriptor_type::value_type                                               value_type;            // Attribute value type.
      typedef attribute_actor< value_type, fallback_to_none, descriptor_type, ActorT >  or_none_result_type;   // Expression with cached attribute name.
      typedef attribute_actor< value_type, fallback_to_throw, descriptor_type, ActorT > or_throw_result_type;  // Expression with cached attribute name.

      // 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.