Krys
Krys

Reputation: 23

clang 3.9, auto_ptr and boost

I encountered errors when trying to compile boost with clang 3.9 in c++1z mode since auto_ptr is removed in c++17. However, I successfully compiled boost with c++14 mode and linked the lib files to the executables compiled with c++1z mode. So, is there going to be any ABI issues or potential bugs in the future ?

Upvotes: 2

Views: 371

Answers (1)

Marshall Clow
Marshall Clow

Reputation: 16670

There shouldn't be any ABI issues with auto_ptr, since it's a header-only feature - nothing in the libc++.dylib.

You can also get auto_ptr back in libc++ by defining _LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR before including any libc++ headers.

The best solution is to ask the maintainer of whatever boost library you're using to not use auto_ptr when you're compiling for C++17.

Upvotes: 5

Related Questions