Created on 2007-07-08.00:00:00 last changed 172 months ago
Proposed resolution:
In [utility] change the synopsis for make_pair() to read
template <class T1, class T2> pair<typename decay<T1>::typeV1,typename decay<T2>::typeV2> make_pair(T1&&, T2&&);
In [pairs]/16 change the declaration to match the above synopsis. Then change the [pairs]/17 to:
Returns: pair<
typename decay<T1>::typeV1,typename decay<T2>::typeV2>(forward<T1>(x),forward<T2>(y)) where V1 and V2 are determined as follows: Let Ui be decay<Ti>::type for each Ti. Then each Vi is X& if Ui equals reference_wrapper<X>, otherwise Vi is Ui.
The current draft has make_pair() in [pairs]/16 and make_tuple() in [tuple.creation]. make_tuple() detects the presence of reference_wrapper<X> arguments and "unwraps" the reference in such cases. make_pair() would OTOH create a reference_wrapper<X> member. I suggest that the two functions are made to behave similar in this respect to minimize confusion.
History | |||
---|---|---|---|
Date | User | Action | Args |
2010-10-21 18:28:33 | admin | set | messages: + msg3497 |
2007-07-08 00:00:00 | admin | create |