
4 Jun
2004
4 Jun
'04
3:15 p.m.
Vladimir Prus <ghost@cs.msu.su> 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