summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Fiselier <eric@efcs.ca>2017-02-17 03:30:25 +0000
committerEric Fiselier <eric@efcs.ca>2017-02-17 03:30:25 +0000
commit07e93d3b00a73f01d8a6c64e03b20b1578a1f339 (patch)
tree84427f69215580e005b84ae8f845e842a6edf0d3
parent2a1bfa98d1c2fc1528c1adcfb3a9d499c39118cd (diff)
downloadbcm5719-llvm-07e93d3b00a73f01d8a6c64e03b20b1578a1f339.tar.gz
bcm5719-llvm-07e93d3b00a73f01d8a6c64e03b20b1578a1f339.zip
Add doc for _LIBCPP_ENABLE_CXX17_DISABLED_AUTO_PTR and make it work under _LIBCPP_ENABLE_CXX17_REMOVED_FEATURES
llvm-svn: 295407
-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