C++ Language/Std/Stl/CollectionClasses/SortedCollections/PairAsOneItem

A "pair" is an object whose type encapsulates two other types.

A pair has a literal form, using braces:. Access each component as  or.

Pair assignment ( operator) copies-by-value the two elements from source to destination. Usually, assignment's destination is another pair. However, pair-assignment could also use  to decompose into two scalar variables.

Additional information about std::pair (includes interactive examples)