## Class template attribute_value_ordering

boost::log::attribute_value_ordering — Ordering predicate, based on attribute values associated with records.

## Synopsis

    // In header: <boost/log/utility/record_ordering.hpp>

    template<typename ValueT, typename FunT = less>
    class attribute_value_ordering : private less {
    public:
      // types
      typedef bool   result_type;  // Result type.
      typedef ValueT value_type;   // Compared attribute value type.

      // member classes/structs/unions

      struct l1_visitor {
        // types
        typedef void result_type;

        // public member functions
        l1_visitor(attribute_value_ordering const &, record_view const &, bool &);
        template<typename LeftT> result_type operator()(LeftT const &) const;
      };
      template<typename LeftT>
      struct l2_visitor {
        // types
        typedef void result_type;

        // public member functions
        l2_visitor(FunT const &, LeftT const &, bool &);
        template<typename RightT> result_type operator()(RightT const &) const;
      };

      // public member functions
      explicit attribute_value_ordering(attribute_name const &,
                                        FunT const & = FunT());
      result_type operator()(record_view const &, record_view const &) const;
    };

## Description

This predicate allows to order log records based on values of a specifically 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.

### `attribute_value_ordering` public member functions

1.     explicit attribute_value_ordering(attribute_name const & name,
                                         FunT const & fun = FunT());

   Initializing constructor.

   Parameters: |
   `name` | The attribute value name to be compared
   `fun` | The ordering functor

2.     result_type operator()(record_view const & left, record_view const & right) const;

   Ordering operator