aboutsummaryrefslogtreecommitdiff
path: root/libcxx/include/__memory/temporary_buffer.h
diff options
context:
space:
mode:
Diffstat (limited to 'libcxx/include/__memory/temporary_buffer.h')
-rw-r--r--libcxx/include/__memory/temporary_buffer.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/libcxx/include/__memory/temporary_buffer.h b/libcxx/include/__memory/temporary_buffer.h
index 06aa6c2936fe..9822bd30c826 100644
--- a/libcxx/include/__memory/temporary_buffer.h
+++ b/libcxx/include/__memory/temporary_buffer.h
@@ -11,18 +11,18 @@
#define _LIBCPP___MEMORY_TEMPORARY_BUFFER_H
#include <__config>
+#include <__utility/pair.h>
#include <cstddef>
#include <new>
-#include <utility> // pair
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
-#pragma GCC system_header
+# pragma GCC system_header
#endif
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Tp>
-_LIBCPP_NODISCARD_EXT _LIBCPP_NO_CFI
+_LIBCPP_NODISCARD_EXT _LIBCPP_NO_CFI _LIBCPP_DEPRECATED_IN_CXX17
pair<_Tp*, ptrdiff_t>
get_temporary_buffer(ptrdiff_t __n) _NOEXCEPT
{
@@ -67,7 +67,7 @@ get_temporary_buffer(ptrdiff_t __n) _NOEXCEPT
}
template <class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_DEPRECATED_IN_CXX17
void return_temporary_buffer(_Tp* __p) _NOEXCEPT
{
_VSTD::__libcpp_deallocate_unsized((void*)__p, _LIBCPP_ALIGNOF(_Tp));
@@ -75,8 +75,10 @@ void return_temporary_buffer(_Tp* __p) _NOEXCEPT
struct __return_temporary_buffer
{
+_LIBCPP_SUPPRESS_DEPRECATED_PUSH
template <class _Tp>
_LIBCPP_INLINE_VISIBILITY void operator()(_Tp* __p) const {_VSTD::return_temporary_buffer(__p);}
+_LIBCPP_SUPPRESS_DEPRECATED_POP
};
_LIBCPP_END_NAMESPACE_STD