Boost logo

Boost :

Subject: Re: [boost] [utility] rvalue support in value_initialized
From: Niels Dekker - address until 2014 (niels_dekker_address_until_2014_at_[hidden])
Date: 2011-09-19 13:13:37

> +
> template<class T>
> +T&& get ( value_initialized<T>&& x )
> +{
> + return std::move( ;
> +}
> +#endif

Mathias Gaunard wrote:
> Note however that it assumes that if BOOST_NO_RVALUE_REFERENCES is not
> set, then you have std::move in <utility>, which isn't the case with
> certain compilers.

In order to avoid such a dependency on <utility>, I would suggest to do
static_cast<T&&>(, instead of std::move(

My two cents, Niels

Niels Dekker
Scientific programmer at LKEB, Leiden University Medical Center

Boost list run by bdawes at, gregod at, cpdaniel at, john at