libc++-5 doesn't know auto_ptr anymore
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? -- View this message in context: http://boost.2283326.n4.nabble.com/libc-5-doesn-t-know-auto-ptr-anymore-tp46... Sent from the Boost - Users mailing list archive at Nabble.com.
On Thu, Feb 23, 2017 at 1:44 AM, bebuch via Boost-users < boost-users@lists.boost.org> 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
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-tp46... Sent from the Boost - Users mailing list archive at Nabble.com.
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
Already tested, doesn't work unfortunately. :-/ -- View this message in context: http://boost.2283326.n4.nabble.com/libc-5-doesn-t-know-auto-ptr-anymore-tp46... Sent from the Boost - Users mailing list archive at Nabble.com.
BOOST_NO_AUTO_PTR defined in boost/config/user.hpp does work. 2017-02-23 16:36 GMT+01:00 bebuch [via Boost] < ml-node+s2283326n4691819h26@n4.nabble.com>:
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 http://boost.2283326.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4691812&code=YmVubmkuYnVjaEBnbWFpbC5jb218NDY5MTgxMnwxNDY5MDQ2MTU1 . NAML http://boost.2283326.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml
-- View this message in context: http://boost.2283326.n4.nabble.com/libc-5-doesn-t-know-auto-ptr-anymore-tp46... Sent from the Boost - Users mailing list archive at Nabble.com.
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ó: bebuch via Boost-users Elküldve: 2017. február 23., csütörtök 16:43 Címzett: boost-users@lists.boost.org Másolatot kap: bebuch 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-tp46... Sent from the Boost - Users mailing list archive at Nabble.com. _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
participants (4)
-
bebuch
-
csiga.biga@aol.com
-
Marshall Clow
-
stefan.naewe@atlas-elektronik.com