Add doc for _LIBCPP_ENABLE_CXX17_DISABLED_AUTO_PTR and make it work under _LIBCPP_ENABLE_CXX17_REMOVED_FEATURES

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@295407 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/docs/UsingLibcxx.rst b/docs/UsingLibcxx.rst
index 9020a2c..fe32f5e 100644
--- a/docs/UsingLibcxx.rst
+++ b/docs/UsingLibcxx.rst
@@ -188,5 +188,7 @@
 
 **_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/include/__config b/include/__config
index fd1dc86..7077f58 100644
--- a/include/__config
+++ b/include/__config
@@ -1057,6 +1057,7 @@
 #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/test/libcxx/depr/enable_removed_cpp17_features.pass.cpp b/test/libcxx/depr/enable_removed_cpp17_features.pass.cpp
index 3962d53..9f8a9c0 100644
--- a/test/libcxx/depr/enable_removed_cpp17_features.pass.cpp
+++ b/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() {
 }