Udostępnij za pośrednictwem


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.

Members

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.

Remarks

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>.

Requirements

Header: <cliext/utility>

Namespace: cliext

See Also

Reference

make_pair (STL/CLR)