
29 Nov
2008
29 Nov
'08
11:02 p.m.
Delayed response, sorry... David Abrahams wrote:
Ah, well. The optimal safe way to write an identity function is of course
template <class T> T identity(T x) { return boost::move(x); }
which on any decent compiler should cause no copies provided T is move-enabled, and only one if it isn't.
What is boost::move() and where in boost does it live? -- Eric Niebler BoostPro Computing http://www.boostpro.com