|
Boost : |
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-09 19:41:26
Howard Hinnant wrote:
>>> How could the standard library have std::unique_ptr without the compiler
>>> supporting rvalue references?
>>
>> Seems like libc++ uses rvalue-ref emulation:
>> http://llvm.org/svn/llvm-project/libcxx/trunk/include/memory
>
> Yeah, but it isn't very good emulation. I don't recommend it.
Thanks for the info, Howard.
Actually, I didn't use std::unique_ptr in a C++03 mode,
but I just included <boost/smart_ptr/shared_ptr.hpp>
#include <boost/smart_ptr/shared_ptr.hpp>
int main(int argc, char* argv[]) { return 0; }
This gives me warnings about rvalue references used in
<boost/smart_ptr/shared_ptr.hpp>.
So I'd be happy if
#if !defined( BOOST_NO_CXX11_SMART_PTR )
will be changed to
#if !defined( BOOST_NO_CXX11_SMART_PTR ) \
&& !defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
Another solution might be defining BOOST_NO_CXX11_SMART_PTR
in Boost.Config for libc++.
Regards,
Michel
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk