pair (STL/CLR)
Visual Studio 2015
The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.
The latest version of this topic can be found at pair (STL/CLR).
The template class describes an object that wraps a pair of values.
template<typename Value1,
typename Value2>
ref class pair;
Parameters
Value1
The type of first wrapped value.
Value2
The type of second wrapped value.
| Type Definition | Description |
|---|---|
| pair::first_type (STL/CLR) | The type of the first wrapped value. |
| pair::second_type (STL/CLR) | The type of the second wrapped value. |
| Member Object | Description |
|---|---|
| pair::first (STL/CLR) | The first stored value. |
| pair::second (STL/CLR) | The second stored value. |
| Member Function | Description |
|---|---|
| pair::pair (STL/CLR) | Constructs a pair object. |
| pair::swap (STL/CLR) | Swaps the contents of two pairs. |
| Operator | Description |
|---|---|
| pair::operator= (STL/CLR) | Replaces the stored pair of values. |
The object stores a pair of values. You use this template class to combine two values into a single object. Note that cliext::pair (described here) stores only managed types; to store a pair of unmanaged types use std::pair, declared in <utility>.
Header: <cliext/utility>
Namespace: cliext
Show: