boost::log::attribute_value_ordering — Ordering predicate, based on attribute values associated with records.
// In header: <boost/log/utility/record_ordering.hpp> template<typename CharT, typename ValueT, typename FunT = aux::less> class attribute_value_ordering { public: // types typedef bool result_type; // Result type. typedef CharT char_type; // Character type. typedef basic_record< char_type > record_type; // Log record type. typedef record_type::string_type string_type; // String type. typedef ValueT attribute_value_type; // Compared attribute value type. // construct/copy/destruct attribute_value_ordering(string_type const &, FunT const & = FunT()); // public member functions result_type operator()(record_type const &, record_type const &) const; };
This predicate allows to order log records based on values of a specificly named attribute associated with them. Two given log records being compared should both have the specified attribute value of the specified type to be able to be ordered properly. As a special case, if neither of the records have the value, these records are considered equivalent. Otherwise, the ordering results are unspecified.