|
Boost : |
From: David Abrahams (dave_at_[hidden])
Date: 2004-06-04 10:15:50
Vladimir Prus <ghost_at_[hidden]> writes:
> Right. I think what is needed is *some* solution which would allow to
> explore FP, not necessary allow using FP in all situations. Perfect
> forwarding for 3 arguments looks fine.
FYI, "perfect forwarding" isn't possible in C++ as it stands:
template <class T> int f(T&);
template <class T> int g(T& x) { return f(x); }
template <class T> int g(T const&) { return f(x); }
int x = f(1); // error
int x = g(1); // OK
In "perfect forwarding", argument rvalue-ness is preserved.
-- Dave Abrahams Boost Consulting http://www.boost-consulting.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk