template<class L, class R>
Pair class
A Pair class representing a tuple with two elements.
Template parameters | |
---|---|
L | Type of the first element. |
R | Type of the second element. |
The Pair class extends the Tuple class for exactly two elements, providing convenient accessors for the first and second elements.
Public types
Constructors, destructors, conversion operators
Public functions
- auto operator=(const Pair& other) -> Pair& constexpr
- Copy assignment operator.
- auto operator=(Pair&& other) -> Pair& constexpr
- Move assignment operator.
- auto first() -> auto&
- Retrieves the first element of the Pair.
- auto second() -> auto&
- Retrieves the second element of the Pair.
- auto first() const -> const auto&
- Retrieves the first element of the Pair (const version).
- auto second() const -> const auto&
- Retrieves the second element of the Pair (const version).