Boost C++ Libraries

PrevUpHomeNext

Struct template basic_formatter

boost::log::formatters::basic_formatter — A base class for formatters.

Synopsis

// In header: <boost/log/formatters/basic_formatters.hpp>

template<typename CharT, typename DerivedT> 
struct basic_formatter : public formatter_base {
  // types
  typedef CharT                                    char_type;         // Character type. 
  typedef std::basic_string< char_type >           string_type;       // String type. 
  typedef std::basic_ostream< char_type >          ostream_type;      // Stream type. 
  typedef basic_attribute_values_view< char_type > values_view_type;  // Attribute values set type. 
  typedef basic_record< char_type >                record_type;       // Log record type. 
  typedef void                                     result_type;       // Functor result type. 
};

Description

The basic_formatter class defines standard types that most formatters use and have to provide in order to be valid functors. This class also enables support for the is_formatter type trait, which allows the formatter to take part in lambda expressions.


PrevUpHomeNext