다음을 통해 공유


<utility>

Defines Standard Template Library (STL) types, functions, and operators that help to construct and manage pairs of objects, which are useful whenever two objects need to be treated as if they were one.

#include <utility>

설명

Pairs are widely used in the Standard C++ Library. They are required both as the arguments and return values for various functions and as element types for containers such as map class and multimap class. The <utility> header is automatically included by <map> to assist in managing their key/value pair type elements.

클래스

tuple_element

A class that wraps the type of a pair element.

tuple_size

A class that wraps pair element count.

함수

forward

Preserves the reference type (either lvalue or rvalue) of the argument from being obscured by perfect forwarding.

get

A function that gets an element from a pair object.

make_pair

A template helper function used to construct objects of type pair, where the component types are based on the data types passed as parameters.

move

Returns the passed in argument as an rvalue reference.

스왑

pair 개체의 요소를 교환합니다.

연산자

operator!=

Tests if the pair object on the left side of the operator is not equal to the pair object on the right side.

operator==

Tests if the pair object on the left side of the operator is equal to the pair object on the right side.

함수입니다.<

Tests if the pair object on the left side of the operator is less than the pair object on the right side.

operator<=

Tests if the pair object on the left side of the operator is less than or equal to the pair object on the right side.

함수입니다.>

Tests if the pair object on the left side of the operator is greater than the pair object on the right side.

operator>=

Tests if the pair object on the left side of the operator is greater than or equal to the pair object on the right side.

Structs

ID

pair

A type that provides for the ability to treat two objects as a single object.

참고 항목

참조

C++ 표준 라이브러리의 스레드 보안

기타 리소스

<utility> 멤버

C++ 표준 라이브러리 헤더 파일