
19 Sep
2011
19 Sep
'11
5:13 p.m.
+#ifndef BOOST_NO_RVALUE_REFERENCES + template<class T> +T&& get ( value_initialized<T>&& x ) +{ + return std::move(x.data()) ; +} ... +#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&&>(x.data()), instead of std::move(x.data()). My two cents, Niels -- Niels Dekker http://www.xs4all.nl/~nd/dekkerware Scientific programmer at LKEB, Leiden University Medical Center