[PATCH] D20660: Remove `auto_ptr` in C++17.

Marshall Clow via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 16 13:37:25 PST 2017


mclow.lists added a comment.

> there's probably a better way to state `_LIBCPP_STD_VER <= 14 || defined(_LIBCPP_NO_REMOVE_AUTO_PTR)`.

There probably is; but remember, we want to make it so someone can `-D_LIBCPP_NO_REMOVE_AUTO_PTR` on the command-line and get this back.

> I would love to have a semi-consistent naming scheme for macros which re-enable removed C++17 features. Maybe `_LIBCPP_ENABLE_REMOVED_CXX17_FOO`

I like this: I'm using `_LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR` now.



================
Comment at: test/libcxx/depr/depr.auto.ptr/auto.ptr/auto_ptr.cxx1z.pass.cpp:26
+{
+    std::shared_ptr<int> p;
+}
----------------
D'oh!  `auto_ptr`


https://reviews.llvm.org/D20660





More information about the cfe-commits mailing list