# `order_statistics_key_cmp` Interface

A comparison functor. Transforms any comparison functor operating on logical keys to a comparison functor operating on order statistics keys.

1. `order_statistics_key.hpp`
2. Template parameters.
3. Base classes.
4. Public Types and Constants:
   1. Policy definitions.
   2. Key-type definitions.
5. Public Methods:
   1. Constructors, destructor, and related.
   2. Operators.
   3. Policy access methods.

## Template parameters.

Parameter | Description | Default Value
    Cmp_Fn
| Comparison functor. |
    std::less<Key>
    Allocator
| Allocator type. The allocator is only used for definitions, e.g., size_type, pointer, and reference. |
    std::allocator<char>

## Base classes.

Class | Derivation Type
    std::binary_function<
      order_statistics_key<
        typename Cmp_Fn::first_argument_type, Allocator>,
      order_statistics_key<
        typename Cmp_Fn::second_argument_type, Allocator>,
      bool>
| public

## Policy definitions.

Type | Definition | Description
    allocator
    Allocator
| Allocator type.
    cmp_fn
    Cmp_Fn
| Comparison functor type.

## Key-type definitions.

Type | Definition | Description
    key_type
    order_statistics_key<
        typename Cmp_Fn::first_argument_type, Allocator>
| Key type.
    const_key_reference
    typename allocator::template rebind<
        key_type>::other::const_reference
| Const key reference type.

## Constructors, destructor, and related.

Method | Description
    inline
      order_statistics_key_cmp
      ()
| Default constructor.
    inline
      order_statistics_key_cmp
      (const Cmp_Fn &r_cmp_fn)
| Constructor taking a comparison functor.

## Operators.

Method | Description
    inline bool
      operator()
      (const_key_reference r_lhs_key,
        const_key_reference r_rhs_key) const
| Compares two keys.

## Policy access methods.

Method | Description
    inline cmp_fn &
      get_cmp_fn
      ()
| Access to the comparison functor object used.
    inline const cmp_fn &
      get_cmp_fn
      () const
| Const access to the comparison functor object used.