On this page
deduction guides for std::pair
Defined in header <utility> |
||
---|---|---|
|
(since C++17) |
One deduction guide is provided for std::pair
to account for the edge cases missed by the implicit deduction guides, in particular, non-copyable arguments and array to pointer conversion.
Example
#include <utility>
int main()
{
int a[2], b[3];
std::pair p{a, b}; // explicit deduction guide is used in this case
}
© cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
https://en.cppreference.com/w/cpp/utility/pair/deduction_guides