|
Boost : |
From: Thorsten Ottosen (nesotto_at_[hidden])
Date: 2005-01-03 13:49:58
"Howard Hinnant" <hinnant_at_[hidden]> wrote in message
news:C94D8AC6-5C17-11D9-BA03-003065D18932_at_twcny.rr.com...
| On Dec 22, 2004, at 8:29 AM, Thorsten Ottosen wrote:
| But with
| an eye towards the future, I think decayed will still eventually
| improve make_pair:
|
| template <class T, class U>
| inline
| pair<typename decayed<typename remove_reference<T>::type>::type,
| typename decayed<typename remove_reference<U>::type>::type>
| make_pair(T&& t, U&& u)
| {
| typedef typename decayed<typename remove_reference<T>::type>::type
| dT;
| typedef typename decayed<typename remove_reference<U>::type>::type
| dU;
| return pair<dT, dU>(std::forward<T>(t), std::forward<U>(u));
| }
why do you need remove_reference? If its needed, then maybe it should be
part of decayed<T>'s behavior.
-Thorsten
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk