[libc++][PMR] Deprecate the implementation in std::experimental
This commit deprecates <experimental/memory_resource> since we now ship the non-experimental
version of it. Per the libc++ policy [1], we are deprecating the experimental feature in
upcoming LLVM 16 and will remove it entirely in LLVM 18.
[1]: https://libcxx.llvm.org/DesignDocs/ExperimentalFeatures.html#id4
Reviewed By: ldionne, #libc
Spies: EricWF, libcxx-commits
Differential Revision: https://reviews.llvm.org/D136245
NOKEYCHECK=True
GitOrigin-RevId: 28e399fa1ec876ea1052db30de570a21ab18d9fb
diff --git a/include/experimental/string b/include/experimental/string
index c6a3e98..4edbf98 100644
--- a/include/experimental/string
+++ b/include/experimental/string
@@ -51,17 +51,21 @@
#ifndef _LIBCPP_CXX03_LANG
+_LIBCPP_SUPPRESS_DEPRECATED_PUSH
+
template <class _CharT, class _Traits = char_traits<_CharT>>
using basic_string =
_VSTD::basic_string<_CharT, _Traits, polymorphic_allocator<_CharT>>;
-typedef basic_string<char> string;
-typedef basic_string<char16_t> u16string;
-typedef basic_string<char32_t> u32string;
+_LIBCPP_DEPCREATED_MEMORY_RESOURCE("string") typedef basic_string<char> string;
+_LIBCPP_DEPCREATED_MEMORY_RESOURCE("u16string") typedef basic_string<char16_t> u16string;
+_LIBCPP_DEPCREATED_MEMORY_RESOURCE("u32string") typedef basic_string<char32_t> u32string;
#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
-typedef basic_string<wchar_t> wstring;
+_LIBCPP_DEPCREATED_MEMORY_RESOURCE("wstring") typedef basic_string<wchar_t> wstring;
#endif
+_LIBCPP_SUPPRESS_DEPRECATED_POP
+
#endif // _LIBCPP_CXX03_LANG
_LIBCPP_END_NAMESPACE_LFTS_PMR