aboutsummaryrefslogtreecommitdiff
path: root/contrib/llvm-project/libcxx/include/scoped_allocator
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/llvm-project/libcxx/include/scoped_allocator')
-rw-r--r--contrib/llvm-project/libcxx/include/scoped_allocator23
1 files changed, 16 insertions, 7 deletions
diff --git a/contrib/llvm-project/libcxx/include/scoped_allocator b/contrib/llvm-project/libcxx/include/scoped_allocator
index 461c67e9b656..90c6f84b7de7 100644
--- a/contrib/llvm-project/libcxx/include/scoped_allocator
+++ b/contrib/llvm-project/libcxx/include/scoped_allocator
@@ -103,7 +103,7 @@ template <class OuterA1, class OuterA2, class... InnerAllocs>
template <class OuterA1, class OuterA2, class... InnerAllocs>
bool
operator!=(const scoped_allocator_adaptor<OuterA1, InnerAllocs...>& a,
- const scoped_allocator_adaptor<OuterA2, InnerAllocs...>& b) noexcept;
+ const scoped_allocator_adaptor<OuterA2, InnerAllocs...>& b) noexcept; // removed in C++20
} // std
@@ -130,6 +130,9 @@ template <class OuterA1, class OuterA2, class... InnerAllocs>
# pragma GCC system_header
#endif
+_LIBCPP_PUSH_MACROS
+#include <__undef_macros>
+
_LIBCPP_BEGIN_NAMESPACE_STD
#if !defined(_LIBCPP_CXX03_LANG)
@@ -531,7 +534,7 @@ public:
__p, _VSTD::forward<_Args>(__args)...);}
template <class _T1, class _T2, class... _Args1, class... _Args2>
- void construct(pair<_T1, _T2>* __p, piecewise_construct_t,
+ _LIBCPP_HIDE_FROM_ABI void construct(pair<_T1, _T2>* __p, piecewise_construct_t,
tuple<_Args1...> __x, tuple<_Args2...> __y)
{
typedef __outermost<outer_allocator_type> _OM;
@@ -555,25 +558,25 @@ public:
}
template <class _T1, class _T2>
- void construct(pair<_T1, _T2>* __p)
+ _LIBCPP_HIDE_FROM_ABI void construct(pair<_T1, _T2>* __p)
{ construct(__p, piecewise_construct, tuple<>{}, tuple<>{}); }
template <class _T1, class _T2, class _Up, class _Vp>
- void construct(pair<_T1, _T2>* __p, _Up&& __x, _Vp&& __y) {
+ _LIBCPP_HIDE_FROM_ABI void construct(pair<_T1, _T2>* __p, _Up&& __x, _Vp&& __y) {
construct(__p, piecewise_construct,
_VSTD::forward_as_tuple(_VSTD::forward<_Up>(__x)),
_VSTD::forward_as_tuple(_VSTD::forward<_Vp>(__y)));
}
template <class _T1, class _T2, class _Up, class _Vp>
- void construct(pair<_T1, _T2>* __p, const pair<_Up, _Vp>& __x) {
+ _LIBCPP_HIDE_FROM_ABI void construct(pair<_T1, _T2>* __p, const pair<_Up, _Vp>& __x) {
construct(__p, piecewise_construct,
_VSTD::forward_as_tuple(__x.first),
_VSTD::forward_as_tuple(__x.second));
}
template <class _T1, class _T2, class _Up, class _Vp>
- void construct(pair<_T1, _T2>* __p, pair<_Up, _Vp>&& __x) {
+ _LIBCPP_HIDE_FROM_ABI void construct(pair<_T1, _T2>* __p, pair<_Up, _Vp>&& __x) {
construct(__p, piecewise_construct,
_VSTD::forward_as_tuple(_VSTD::forward<_Up>(__x.first)),
_VSTD::forward_as_tuple(_VSTD::forward<_Vp>(__x.second)));
@@ -678,7 +681,7 @@ private:
template <class...> friend class __scoped_allocator_storage;
};
-#if _LIBCPP_STD_VER > 14
+#if _LIBCPP_STD_VER >= 17
template<class _OuterAlloc, class... _InnerAllocs>
scoped_allocator_adaptor(_OuterAlloc, _InnerAllocs...)
-> scoped_allocator_adaptor<_OuterAlloc, _InnerAllocs...>;
@@ -703,6 +706,8 @@ operator==(const scoped_allocator_adaptor<_OuterA1, _InnerA0, _InnerAllocs...>&
__a.inner_allocator() == __b.inner_allocator();
}
+#if _LIBCPP_STD_VER <= 17
+
template <class _OuterA1, class _OuterA2, class... _InnerAllocs>
inline _LIBCPP_INLINE_VISIBILITY
bool
@@ -712,10 +717,14 @@ operator!=(const scoped_allocator_adaptor<_OuterA1, _InnerAllocs...>& __a,
return !(__a == __b);
}
+#endif // _LIBCPP_STD_VER <= 17
+
#endif // !defined(_LIBCPP_CXX03_LANG)
_LIBCPP_END_NAMESPACE_STD
+_LIBCPP_POP_MACROS
+
#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
# include <atomic>
# include <climits>