Referring to this website http://www.cplusplus.com/reference/std/utility/make_pair/
Std :: make_pair has this signature (and a possible implementation):
template <class T1,class T2> pair<T1,T2> make_pair (T1 x, T2 y) { return ( pair<T1,T2>(x,y) ); }
I am wondering why std :: make_pair has an input parameter by value rather than a const reference?
Is there any specific reason for this?
source share