[libcxx-commits] [libcxx] [libc++] Remove functions deprecated in C++17 and removed in C++20 (PR #100914)

A. Jiang via libcxx-commits libcxx-commits at lists.llvm.org
Mon Jul 29 00:03:26 PDT 2024


================
@@ -22,8 +22,8 @@
 _LIBCPP_BEGIN_NAMESPACE_STD
 
 template <class _Tp>
-_LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI _LIBCPP_NO_CFI _LIBCPP_DEPRECATED_IN_CXX17 pair<_Tp*, ptrdiff_t>
-get_temporary_buffer(ptrdiff_t __n) _NOEXCEPT {
+_LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI _LIBCPP_NO_CFI pair<_Tp*, ptrdiff_t>
+__get_temporary_buffer(ptrdiff_t __n) _NOEXCEPT {
----------------
frederick-vs-ja wrote:

Initially, I though it would be trivial to switch to call `allocator<T>::allocate()`. However, it's probably intented to call `nothrow` versions of `operator new` in this function. And per #69498, I think we want to support reconvering from allocation failure under -fno-exceptions.

Given `allocate` calls throwing versions of `operator new`, it can lead to undesired termination at run time under -fno-exceptions, while such termination is avoided currently.

https://github.com/llvm/llvm-project/pull/100914


More information about the libcxx-commits mailing list