libc++-5 doesn't know auto_ptr anymore

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

libc++-5 doesn't know auto_ptr anymore

bebuch
I just tried to compile one of my projects with LLVM-TOT and got a lot of error massages in boost's shared_ptr implementation because libc++ removes std::auto_ptr.

(I don't use boost::shared_ptr directly, but via parts of boost::dll and boost:spirit::x3.)

Is there a workaround?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: libc++-5 doesn't know auto_ptr anymore

Boost - Users mailing list


On Thu, Feb 23, 2017 at 1:44 AM, bebuch via Boost-users <[hidden email]> wrote:
I just tried to compile one of my projects with LLVM-TOT and got a lot of
error massages in boost's shared_ptr implementation because libc++ removes
std::auto_ptr.

auto_ptr has been removed from the upcoming C++17 standard.
 
(I don't use boost::shared_ptr directly, but via parts of boost::dll and
boost:spirit::x3.)

Is there a workaround?

You can either:
* not build with C++17 (-std=c++1z), or
* define the macro _LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR before including any standard library files (on the command-line or in the Jamfile)

-- Marshall


_______________________________________________
Boost-users mailing list
[hidden email]
http://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: libc++-5 doesn't know auto_ptr anymore

bebuch
Unfortunately these aren't solutions for my problem, but for the counterpart of it.

I don't need auto_ptr, but the boost implementation of shared_ptr does.

If the standard library (libc++ in this case) does not provide std::auto_ptr, I can't use boost::shared_ptr. (Again I won't use boost::shared_ptr, but the other boost libraries I use do.) The best solution would be, when boost::dll, boost::filesystem and boost::spirit::x3 would use std::shared_ptr instead of boost::shared_ptr if available. (The same with boost::filesystem and std::filesystem by the way.)

To clarify my question: Is there a way to disable std::auto_ptr overloads inside the boost library? Especially inside the Boost Smart Ptr library.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: libc++-5 doesn't know auto_ptr anymore

Boost - Users mailing list
Am 23.02.2017 um 16:27 schrieb bebuch via Boost-users:

> Unfortunately these aren't solutions for my problem, but for the counterpart
> of it.
>
> I don't need auto_ptr, but the boost implementation of shared_ptr does.
>
> If the standard library (libc++ in this case) does not provide
> std::auto_ptr, I can't use boost::shared_ptr. (Again I won't use
> boost::shared_ptr, but the other boost libraries I use do.) The best
> solution would be, when boost::dll, boost::filesystem and boost::spirit::x3
> would use std::shared_ptr instead of boost::shared_ptr if available. (The
> same with boost::filesystem and std::filesystem by the way.)
>
> To clarify my question: Is there a way to disable std::auto_ptr overloads
> inside the boost library? Especially inside the Boost Smart Ptr library.

What about #defining BOOST_NO_AUTO_PTR ?? (Didn't test it...)

HTH

Stefan
--
----------------------------------------------------------------
/dev/random says: "Apple" (c) Copyright 1767, Sir Isaac Newton.
python -c "print '73746566616e2e6e616577654061746c61732d656c656b74726f6e696b2e636f6d'.decode('hex')"
GPG Key fingerprint = 2DF5 E01B 09C3 7501 BCA9  9666 829B 49C5 9221 27AF
_______________________________________________
Boost-users mailing list
[hidden email]
http://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: libc++-5 doesn't know auto_ptr anymore

bebuch
Already tested, doesn't work unfortunately. :-/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: libc++-5 doesn't know auto_ptr anymore

Boost - Users mailing list
In reply to this post by bebuch

I have similar issues as well, but with MSVC with toolset v141 and /std:c++latest. It chokes on std::unary_function having been removed, but I really need post C++14 features.

 

It is very annoying that Boost configures almost entirely manually. MSVC specific config header is purely based on compiler versions instead of probing for particular featues. Apologies for axing the developers again because of this, but if Boost would have mainlined any of the projects that aimed on using CMake as a configure and build system, we’d have none of these issues. One could properly detect features of compilers unknown to Boost at the time it was written.

 

Feladó: [hidden email]
Elküldve: 2017. február 23., csütörtök 16:43
Címzett: [hidden email]
Másolatot kap: [hidden email]
Tárgy: Re: [Boost-users] libc++-5 doesn't know auto_ptr anymore

 

Unfortunately these aren't solutions for my problem, but for the counterpart

of it.

 

I don't need auto_ptr, but the boost implementation of shared_ptr does.

 

If the standard library (libc++ in this case) does not provide

std::auto_ptr, I can't use boost::shared_ptr. (Again I won't use

boost::shared_ptr, but the other boost libraries I use do.) The best

solution would be, when boost::dll, boost::filesystem and boost::spirit::x3

would use std::shared_ptr instead of boost::shared_ptr if available. (The

same with boost::filesystem and std::filesystem by the way.)

 

To clarify my question: Is there a way to disable std::auto_ptr overloads

inside the boost library? Especially inside the Boost Smart Ptr library.

 

 

 

--

View this message in context: http://boost.2283326.n4.nabble.com/libc-5-doesn-t-know-auto-ptr-anymore-tp4691812p4691817.html

Sent from the Boost - Users mailing list archive at Nabble.com.

_______________________________________________

Boost-users mailing list

[hidden email]

http://lists.boost.org/mailman/listinfo.cgi/boost-users

 


_______________________________________________
Boost-users mailing list
[hidden email]
http://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: libc++-5 doesn't know auto_ptr anymore

bebuch
In reply to this post by bebuch
BOOST_NO_AUTO_PTR defined in boost/config/user.hpp does work.

2017-02-23 16:36 GMT+01:00 bebuch [via Boost] <[hidden email]>:
Already tested, doesn't work unfortunately. :-/


If you reply to this email, your message will be added to the discussion below:
http://boost.2283326.n4.nabble.com/libc-5-doesn-t-know-auto-ptr-anymore-tp4691812p4691819.html
To unsubscribe from libc++-5 doesn't know auto_ptr anymore, click here.
NAML

Loading...