
3 Nov
2009
3 Nov
'09
6:25 p.m.
on 02.11.2009 at 23:08 Thomas Klimpel wrote :
Boost.Move is really similar to what you are proposing, but it also handles the case that the compiler actually supports rvalue-references. So BOOST_RV_REF is a macro defined as:
#ifdef BOOST_HAS_RVALUE_REFS #define BOOST_RV_REF(TYPE) TYPE && #else #define BOOST_RV_REF(TYPE) boost::rv< TYPE >& #endif
It is true that macros always look ugly, but this is exactly the situation where you have to use a macro to abstract away unavoidable language differences.
ok then i'm stopping panic right now i understand your point and i think that it is probably right however i'm stuck to my own opinion -- Pavel