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
This commit is contained in:
@@ -188,5 +188,7 @@ C++17 Specific Configuration Macros
|
|||||||
|
|
||||||
**_LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS**:
|
**_LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS**:
|
||||||
This macro is used to re-enable the `set_unexpected`, `get_unexpected`, and
|
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
|
`unexpected` functions, which were removed in C++17.
|
||||||
define those names will not be available in C++17.
|
|
||||||
|
**_LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR**:
|
||||||
|
This macro is used to re-enable `std::auto_ptr` in C++17.
|
||||||
|
|||||||
@@ -1057,6 +1057,7 @@ _LIBCPP_FUNC_VIS extern "C" void __sanitizer_annotate_contiguous_container(
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(_LIBCPP_ENABLE_CXX17_REMOVED_FEATURES)
|
#if defined(_LIBCPP_ENABLE_CXX17_REMOVED_FEATURES)
|
||||||
|
# define _LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR
|
||||||
# define _LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS
|
# define _LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS
|
||||||
#endif // _LIBCPP_ENABLE_CXX17_REMOVED_FEATURES
|
#endif // _LIBCPP_ENABLE_CXX17_REMOVED_FEATURES
|
||||||
|
|
||||||
|
|||||||
@@ -18,5 +18,9 @@
|
|||||||
#error _LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS must be defined
|
#error _LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS must be defined
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef _LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR
|
||||||
|
#error _LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR must be defined
|
||||||
|
#endif
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user