Apache C++ Standard Library Reference Guide

## <utility>

Library: General utilities

    Header

- Local Index
- Summary
- Synopsis
- See Also
- Standards Conformance

### Local Index

No Entries

### Summary

The header `<utility>` is part of the General utilities library of the C++ Standard Library. It defines the class template pair, a helper function template `make_pair()`, a set of relational operators that C++ programs may use to perform equality and inequality tests on specializations of pair, and, in the namespace `rel_ops`, the function templates `operator!=()`, `operator>()`, `operator<=()`, and `operator>=()`.

### Synopsis

    namespace std {
      namespace rel_ops {
        template<class T> bool operator!=(const T&, const T&);
        template<class T> bool operator> (const T&, const T&);
        template<class T> bool operator<=(const T&, const T&);
        template<class T> bool operator>=(const T&, const T&);
      }

      template <class T1, class T2>
      struct pair;
      template <class T1, class T2>
      bool operator==(const pair<T1, T2>&, const pair<T1, T2>&);
      template <class T1, class T2>
      bool operator< (const pair<T1, T2>&, const pair<T1, T2>&);
      template <class T1, class T2>
      bool operator!=(const pair<T1, T2>&, const pair<T1, T2>&);
      template <class T1, class T2>
      bool operator> (const pair<T1, T2>&, const pair<T1, T2>&);
      template <class T1, class T2>
      bool operator>=(const pair<T1, T2>&, const pair<T1, T2>&);
      template <class T1, class T2>
      bool operator<=(const pair<T1, T2>&, const pair<T1, T2>&);
      template <class T1, class T2> pair<T1, T2>
      make_pair (const T1&, const T2&);
    }

### See Also

pair, Operators

### Standards Conformance

ISO/IEC 14882:1998 -- International Standard for Information Systems --Programming Language C++, Section 20.2