Subject: Re: [boost] [smart_ptr] !defined(BOOST_NO_CXX11_SMART_PTR) does notimply !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
From: Michel Morin (mimomorin_at_[hidden])
Date: 2013-02-08 23:22:06
Peter Dimov wrote:
> Michel Morin wrote:
>> `!defined(BOOST_NO_CXX11_SMART_PTR)` does not necessarily mean that
>> the compiler support of rvalue references is available. For example,
> How could the standard library have std::unique_ptr without the compiler
> supporting rvalue references?
Seems like libc++ uses rvalue-ref emulation:
>> when I use shared_ptr (on trunk) with clang + libc++ in a C++03 mode,
>> I get warnings something like
>> warning: rvalue references are a C++11 extension [-Wc++11-extensions]
>> shared_ptr & operator=( std::unique_ptr<Y, D> && r )
> Looks like rvalue references are available, but as an extension.
You're right. But compiling with -Werror or -pedantic-errors results in
compilation errors. Also BOOST_NO_CXX11_RVALUE_REFERENCES is defined.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk