Subject: Re: [boost] Temporary objects
From: Thomas Klimpel (Thomas.Klimpel_at_[hidden])
Date: 2009-11-02 15:08:06
> Mathias Gaunard wrote:
> > Boost.Move is actually fairly similar to what you are proposing.
> well, to this point i still think that a temporary<type> better
> reflects the underlying semantics than, i guess, BOOST_RV_REF(type) (looks extremely ugly)
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:
#define BOOST_RV_REF(TYPE) TYPE &&
#define BOOST_RV_REF(TYPE) boost::rv< TYPE >&
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.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk