From 92b69215e63a3303a5e904ab332e2eec236e0ed2 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Mon, 16 Aug 2021 23:30:18 -0700 Subject: update libcxx, libcxxabi, libunwind, and tsan to llvm 13 rc1 --- lib/libcxx/include/stack | 36 +++++++++++++++--------------------- 1 file changed, 15 insertions(+), 21 deletions(-) (limited to 'lib/libcxx/include/stack') diff --git a/lib/libcxx/include/stack b/lib/libcxx/include/stack index 2a2b350386..aefef31ac9 100644 --- a/lib/libcxx/include/stack +++ b/lib/libcxx/include/stack @@ -88,6 +88,8 @@ template */ #include <__config> +#include <__memory/uses_allocator.h> +#include <__utility/forward.h> #include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) @@ -148,7 +150,7 @@ public: _LIBCPP_INLINE_VISIBILITY explicit stack(container_type&& __c) : c(_VSTD::move(__c)) {} -#endif // _LIBCPP_CXX03_LANG +#endif // _LIBCPP_CXX03_LANG _LIBCPP_INLINE_VISIBILITY explicit stack(const container_type& __c) : c(__c) {} @@ -156,35 +158,30 @@ public: template _LIBCPP_INLINE_VISIBILITY explicit stack(const _Alloc& __a, - typename enable_if::value>::type* = 0) + _EnableIf::value>* = 0) : c(__a) {} template _LIBCPP_INLINE_VISIBILITY stack(const container_type& __c, const _Alloc& __a, - typename enable_if::value>::type* = 0) + _EnableIf::value>* = 0) : c(__c, __a) {} template _LIBCPP_INLINE_VISIBILITY stack(const stack& __s, const _Alloc& __a, - typename enable_if::value>::type* = 0) + _EnableIf::value>* = 0) : c(__s.c, __a) {} #ifndef _LIBCPP_CXX03_LANG template _LIBCPP_INLINE_VISIBILITY stack(container_type&& __c, const _Alloc& __a, - typename enable_if::value>::type* = 0) + _EnableIf::value>* = 0) : c(_VSTD::move(__c), __a) {} template _LIBCPP_INLINE_VISIBILITY stack(stack&& __s, const _Alloc& __a, - typename enable_if::value>::type* = 0) + _EnableIf::value>* = 0) : c(_VSTD::move(__s.c), __a) {} -#endif // _LIBCPP_CXX03_LANG +#endif // _LIBCPP_CXX03_LANG _LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY bool empty() const {return c.empty();} @@ -210,7 +207,7 @@ public: void emplace(_Args&&... __args) { c.emplace_back(_VSTD::forward<_Args>(__args)...);} #endif -#endif // _LIBCPP_CXX03_LANG +#endif // _LIBCPP_CXX03_LANG _LIBCPP_INLINE_VISIBILITY void pop() {c.pop_back();} @@ -236,15 +233,15 @@ public: #ifndef _LIBCPP_HAS_NO_DEDUCTION_GUIDES template::value, nullptr_t>::type + class = _EnableIf::value> > stack(_Container) -> stack; template::value, nullptr_t>::type, - class = typename enable_if< __is_allocator<_Alloc>::value, nullptr_t>::type + class = _EnableIf::value>, + class = _EnableIf::value> > stack(_Container, _Alloc) -> stack; @@ -300,10 +297,7 @@ operator<=(const stack<_Tp, _Container>& __x, const stack<_Tp, _Container>& __y) template inline _LIBCPP_INLINE_VISIBILITY -typename enable_if< - __is_swappable<_Container>::value, - void ->::type +_EnableIf<__is_swappable<_Container>::value, void> swap(stack<_Tp, _Container>& __x, stack<_Tp, _Container>& __y) _NOEXCEPT_(_NOEXCEPT_(__x.swap(__y))) { @@ -318,4 +312,4 @@ struct _LIBCPP_TEMPLATE_VIS uses_allocator, _Alloc> _LIBCPP_END_NAMESPACE_STD -#endif // _LIBCPP_STACK +#endif // _LIBCPP_STACK -- cgit v1.2.3