std::pair
a way to store two heterogeneous objects as a single unit. A pair is a specific case of a std::tuple with two elements. - cppreference.com
see also
- Deduction guide
- Difference between std::pair and std::tuple with only two members?
- Why is std::pair faster than std::tuple - in the end, performance results are equivalent/the same.
- It is fully expected that std::tuple will be slower than std::pair when not optimized, because it is more complicated object.
Written on June 7, 2023, Last update on June 7, 2023
c++
tuple