boost::log::handle_ordering — Ordering predicate, based on log record handle comparison.
// In header: <boost/log/utility/record_ordering.hpp> template<typename FunT = aux::less> class handle_ordering { public: // types typedef bool result_type; // Result type. // construct/copy/destruct handle_ordering(); explicit handle_ordering(FunT const &); // public member functions template<typename CharT> result_type operator()(basic_record< CharT > const &, basic_record< CharT > const &) const; };
This predicate offers a quick log record ordering based on the log record handles. It is not specified whether one record is less than another, in terms of the predicate, until the actual comparison is performed. Moreover, the ordering may change every time the application runs.
This kind of ordering may be useful if log records are to be stored in an associative container with as least performance overhead as possible.