Top of document
©Copyright 1999 Rogue Wave Software

pair


     Utility Class

Summary

A template for heterogenous pairs of values.

Contents

Synopsis

#include <utility>
template <class T1, class T2>
struct pair ;

Description

The pair class provides a template for encapsulating pairs of values that may be of different types.

Interface

template <class T1, class T2>
 struct pair {
        T1 first;
        T2 second;
        pair();
        pair (const T1&, const T2&);
        ~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>
 pair<T1,T2> make_pair (const T1&, const T2&);

Constructors and Destructors

pair ();
pair (const T1& x, const T2& y);
~pair ();

Non-member Operators

template <class T1, class T2>
bool operator== (const pair<T1, T2>& x,
                  const pair T1, T2>& y);
template <class T1, class T2>
bool operator< (const pair<T1, T2>& x,
                const pair T1, T2>& y);

Non-member Functions

template <class T1, class T2>
pair<T1,T2>
make_pair(x,y);

Top of document