summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libcxx/docs/UsingLibcxx.rst6
-rw-r--r--libcxx/include/__config1
-rw-r--r--libcxx/test/libcxx/depr/enable_removed_cpp17_features.pass.cpp4
3 files changed, 9 insertions, 2 deletions
diff --git a/libcxx/docs/UsingLibcxx.rst b/libcxx/docs/UsingLibcxx.rst
index 9020a2c3601..fe32f5e6b21 100644
--- a/libcxx/docs/UsingLibcxx.rst
+++ b/libcxx/docs/UsingLibcxx.rst
@@ -188,5 +188,7 @@ C++17 Specific Configuration Macros
**_LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS**:
This macro is used to re-enable the `set_unexpected`, `get_unexpected`, and
- `unexpected` functions, which were removed in C++17. Unless this macro is
- define those names will not be available in C++17.
+ `unexpected` functions, which were removed in C++17.
+
+**_LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR**:
+ This macro is used to re-enable `std::auto_ptr` in C++17.
diff --git a/libcxx/include/__config b/libcxx/include/__config
index fd1dc8609e7..7077f588480 100644
--- a/libcxx/include/__config
+++ b/libcxx/include/__config
@@ -1057,6 +1057,7 @@ _LIBCPP_FUNC_VIS extern "C" void __sanitizer_annotate_contiguous_container(
#endif
#if defined(_LIBCPP_ENABLE_CXX17_REMOVED_FEATURES)
+# define _LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR
# define _LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS
#endif // _LIBCPP_ENABLE_CXX17_REMOVED_FEATURES
diff --git a/libcxx/test/libcxx/depr/enable_removed_cpp17_features.pass.cpp b/libcxx/test/libcxx/depr/enable_removed_cpp17_features.pass.cpp
index 3962d536be3..9f8a9c0888b 100644
--- a/libcxx/test/libcxx/depr/enable_removed_cpp17_features.pass.cpp
+++ b/libcxx/test/libcxx/depr/enable_removed_cpp17_features.pass.cpp
@@ -18,5 +18,9 @@
#error _LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS must be defined
#endif
+#ifndef _LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR
+#error _LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR must be defined
+#endif
+
int main() {
}
OpenPOWER on IntegriCloud