libcxx: update to LLVM 18
release/18.x branch, commit 78b99c73ee4b96fe9ce0e294d4632326afb2db42 This adds the flag `-D_LIBCPP_HARDENING_MODE` which is determined based on the Zig optimization mode. This commit also fixes libunwind, libcxx, and libcxxabi to properly report sub compilation errors.
This commit is contained in:
336
lib/libcxx/include/stack
vendored
336
lib/libcxx/include/stack
vendored
@@ -138,269 +138,212 @@ template <class T, class Container>
|
||||
# pragma GCC system_header
|
||||
#endif
|
||||
|
||||
_LIBCPP_PUSH_MACROS
|
||||
#include <__undef_macros>
|
||||
|
||||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
template <class _Tp, class _Container = deque<_Tp> > class _LIBCPP_TEMPLATE_VIS stack;
|
||||
template <class _Tp, class _Container = deque<_Tp> >
|
||||
class _LIBCPP_TEMPLATE_VIS stack;
|
||||
|
||||
template <class _Tp, class _Container>
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
bool
|
||||
operator==(const stack<_Tp, _Container>& __x, const stack<_Tp, _Container>& __y);
|
||||
_LIBCPP_HIDE_FROM_ABI bool operator==(const stack<_Tp, _Container>& __x, const stack<_Tp, _Container>& __y);
|
||||
|
||||
template <class _Tp, class _Container>
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
bool
|
||||
operator< (const stack<_Tp, _Container>& __x, const stack<_Tp, _Container>& __y);
|
||||
_LIBCPP_HIDE_FROM_ABI bool operator<(const stack<_Tp, _Container>& __x, const stack<_Tp, _Container>& __y);
|
||||
|
||||
template <class _Tp, class _Container /*= deque<_Tp>*/>
|
||||
class _LIBCPP_TEMPLATE_VIS stack
|
||||
{
|
||||
class _LIBCPP_TEMPLATE_VIS stack {
|
||||
public:
|
||||
typedef _Container container_type;
|
||||
typedef typename container_type::value_type value_type;
|
||||
typedef typename container_type::reference reference;
|
||||
typedef typename container_type::const_reference const_reference;
|
||||
typedef typename container_type::size_type size_type;
|
||||
static_assert((is_same<_Tp, value_type>::value), "" );
|
||||
typedef _Container container_type;
|
||||
typedef typename container_type::value_type value_type;
|
||||
typedef typename container_type::reference reference;
|
||||
typedef typename container_type::const_reference const_reference;
|
||||
typedef typename container_type::size_type size_type;
|
||||
static_assert((is_same<_Tp, value_type>::value), "");
|
||||
|
||||
protected:
|
||||
container_type c;
|
||||
container_type c;
|
||||
|
||||
public:
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
stack()
|
||||
_NOEXCEPT_(is_nothrow_default_constructible<container_type>::value)
|
||||
: c() {}
|
||||
_LIBCPP_HIDE_FROM_ABI stack() _NOEXCEPT_(is_nothrow_default_constructible<container_type>::value) : c() {}
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
stack(const stack& __q) : c(__q.c) {}
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
stack& operator=(const stack& __q) {c = __q.c; return *this;}
|
||||
_LIBCPP_HIDE_FROM_ABI stack(const stack& __q) : c(__q.c) {}
|
||||
|
||||
_LIBCPP_HIDE_FROM_ABI stack& operator=(const stack& __q) {
|
||||
c = __q.c;
|
||||
return *this;
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_CXX03_LANG
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
stack(stack&& __q)
|
||||
_NOEXCEPT_(is_nothrow_move_constructible<container_type>::value)
|
||||
: c(_VSTD::move(__q.c)) {}
|
||||
_LIBCPP_HIDE_FROM_ABI stack(stack&& __q) _NOEXCEPT_(is_nothrow_move_constructible<container_type>::value)
|
||||
: c(std::move(__q.c)) {}
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
stack& operator=(stack&& __q)
|
||||
_NOEXCEPT_(is_nothrow_move_assignable<container_type>::value)
|
||||
{c = _VSTD::move(__q.c); return *this;}
|
||||
_LIBCPP_HIDE_FROM_ABI stack& operator=(stack&& __q) _NOEXCEPT_(is_nothrow_move_assignable<container_type>::value) {
|
||||
c = std::move(__q.c);
|
||||
return *this;
|
||||
}
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
explicit stack(container_type&& __c) : c(_VSTD::move(__c)) {}
|
||||
_LIBCPP_HIDE_FROM_ABI explicit stack(container_type&& __c) : c(std::move(__c)) {}
|
||||
#endif // _LIBCPP_CXX03_LANG
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
explicit stack(const container_type& __c) : c(__c) {}
|
||||
_LIBCPP_HIDE_FROM_ABI explicit stack(const container_type& __c) : c(__c) {}
|
||||
|
||||
template <class _Alloc>
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
explicit stack(const _Alloc& __a,
|
||||
__enable_if_t<uses_allocator<container_type, _Alloc>::value>* = 0)
|
||||
: c(__a) {}
|
||||
template <class _Alloc>
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
stack(const container_type& __c, const _Alloc& __a,
|
||||
__enable_if_t<uses_allocator<container_type, _Alloc>::value>* = 0)
|
||||
: c(__c, __a) {}
|
||||
template <class _Alloc>
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
stack(const stack& __s, const _Alloc& __a,
|
||||
__enable_if_t<uses_allocator<container_type, _Alloc>::value>* = 0)
|
||||
: c(__s.c, __a) {}
|
||||
template <class _Alloc>
|
||||
_LIBCPP_HIDE_FROM_ABI explicit stack(const _Alloc& __a,
|
||||
__enable_if_t<uses_allocator<container_type, _Alloc>::value>* = 0)
|
||||
: c(__a) {}
|
||||
template <class _Alloc>
|
||||
_LIBCPP_HIDE_FROM_ABI
|
||||
stack(const container_type& __c, const _Alloc& __a, __enable_if_t<uses_allocator<container_type, _Alloc>::value>* = 0)
|
||||
: c(__c, __a) {}
|
||||
template <class _Alloc>
|
||||
_LIBCPP_HIDE_FROM_ABI
|
||||
stack(const stack& __s, const _Alloc& __a, __enable_if_t<uses_allocator<container_type, _Alloc>::value>* = 0)
|
||||
: c(__s.c, __a) {}
|
||||
#ifndef _LIBCPP_CXX03_LANG
|
||||
template <class _Alloc>
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
stack(container_type&& __c, const _Alloc& __a,
|
||||
__enable_if_t<uses_allocator<container_type, _Alloc>::value>* = 0)
|
||||
: c(_VSTD::move(__c), __a) {}
|
||||
template <class _Alloc>
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
stack(stack&& __s, const _Alloc& __a,
|
||||
__enable_if_t<uses_allocator<container_type, _Alloc>::value>* = 0)
|
||||
: c(_VSTD::move(__s.c), __a) {}
|
||||
template <class _Alloc>
|
||||
_LIBCPP_HIDE_FROM_ABI
|
||||
stack(container_type&& __c, const _Alloc& __a, __enable_if_t<uses_allocator<container_type, _Alloc>::value>* = 0)
|
||||
: c(std::move(__c), __a) {}
|
||||
template <class _Alloc>
|
||||
_LIBCPP_HIDE_FROM_ABI
|
||||
stack(stack&& __s, const _Alloc& __a, __enable_if_t<uses_allocator<container_type, _Alloc>::value>* = 0)
|
||||
: c(std::move(__s.c), __a) {}
|
||||
#endif // _LIBCPP_CXX03_LANG
|
||||
|
||||
#if _LIBCPP_STD_VER >= 23
|
||||
template <class _InputIterator,
|
||||
class = __enable_if_t<__has_input_iterator_category<_InputIterator>::value>>
|
||||
_LIBCPP_HIDE_FROM_ABI
|
||||
stack(_InputIterator __first, _InputIterator __last) : c(__first, __last) {}
|
||||
template <class _InputIterator, class = __enable_if_t<__has_input_iterator_category<_InputIterator>::value>>
|
||||
_LIBCPP_HIDE_FROM_ABI stack(_InputIterator __first, _InputIterator __last) : c(__first, __last) {}
|
||||
|
||||
template <_ContainerCompatibleRange<_Tp> _Range>
|
||||
_LIBCPP_HIDE_FROM_ABI
|
||||
stack(from_range_t, _Range&& __range) : c(from_range, std::forward<_Range>(__range)) {}
|
||||
template <_ContainerCompatibleRange<_Tp> _Range>
|
||||
_LIBCPP_HIDE_FROM_ABI stack(from_range_t, _Range&& __range) : c(from_range, std::forward<_Range>(__range)) {}
|
||||
|
||||
template <class _InputIterator,
|
||||
class _Alloc,
|
||||
class = __enable_if_t<__has_input_iterator_category<_InputIterator>::value>,
|
||||
class = __enable_if_t<uses_allocator<container_type, _Alloc>::value>>
|
||||
_LIBCPP_HIDE_FROM_ABI
|
||||
stack(_InputIterator __first, _InputIterator __last, const _Alloc& __alloc) : c(__first, __last, __alloc) {}
|
||||
template <class _InputIterator,
|
||||
class _Alloc,
|
||||
class = __enable_if_t<__has_input_iterator_category<_InputIterator>::value>,
|
||||
class = __enable_if_t<uses_allocator<container_type, _Alloc>::value>>
|
||||
_LIBCPP_HIDE_FROM_ABI stack(_InputIterator __first, _InputIterator __last, const _Alloc& __alloc)
|
||||
: c(__first, __last, __alloc) {}
|
||||
|
||||
template <_ContainerCompatibleRange<_Tp> _Range,
|
||||
class _Alloc,
|
||||
class = __enable_if_t<uses_allocator<container_type, _Alloc>::value>>
|
||||
_LIBCPP_HIDE_FROM_ABI
|
||||
stack(from_range_t, _Range&& __range, const _Alloc& __alloc)
|
||||
: c(from_range, std::forward<_Range>(__range), __alloc) {}
|
||||
template <_ContainerCompatibleRange<_Tp> _Range,
|
||||
class _Alloc,
|
||||
class = __enable_if_t<uses_allocator<container_type, _Alloc>::value>>
|
||||
_LIBCPP_HIDE_FROM_ABI stack(from_range_t, _Range&& __range, const _Alloc& __alloc)
|
||||
: c(from_range, std::forward<_Range>(__range), __alloc) {}
|
||||
|
||||
#endif
|
||||
|
||||
_LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
|
||||
bool empty() const {return c.empty();}
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
size_type size() const {return c.size();}
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
reference top() {return c.back();}
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
const_reference top() const {return c.back();}
|
||||
_LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI bool empty() const { return c.empty(); }
|
||||
_LIBCPP_HIDE_FROM_ABI size_type size() const { return c.size(); }
|
||||
_LIBCPP_HIDE_FROM_ABI reference top() { return c.back(); }
|
||||
_LIBCPP_HIDE_FROM_ABI const_reference top() const { return c.back(); }
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
void push(const value_type& __v) {c.push_back(__v);}
|
||||
_LIBCPP_HIDE_FROM_ABI void push(const value_type& __v) { c.push_back(__v); }
|
||||
#ifndef _LIBCPP_CXX03_LANG
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
void push(value_type&& __v) {c.push_back(_VSTD::move(__v));}
|
||||
_LIBCPP_HIDE_FROM_ABI void push(value_type&& __v) { c.push_back(std::move(__v)); }
|
||||
|
||||
#if _LIBCPP_STD_VER >= 23
|
||||
template <_ContainerCompatibleRange<_Tp> _Range>
|
||||
_LIBCPP_HIDE_FROM_ABI
|
||||
void push_range(_Range&& __range) {
|
||||
if constexpr (requires (container_type& __c) {
|
||||
__c.append_range(std::forward<_Range>(__range));
|
||||
}) {
|
||||
c.append_range(std::forward<_Range>(__range));
|
||||
} else {
|
||||
ranges::copy(std::forward<_Range>(__range), std::back_inserter(c));
|
||||
}
|
||||
# if _LIBCPP_STD_VER >= 23
|
||||
template <_ContainerCompatibleRange<_Tp> _Range>
|
||||
_LIBCPP_HIDE_FROM_ABI void push_range(_Range&& __range) {
|
||||
if constexpr (requires(container_type& __c) { __c.append_range(std::forward<_Range>(__range)); }) {
|
||||
c.append_range(std::forward<_Range>(__range));
|
||||
} else {
|
||||
ranges::copy(std::forward<_Range>(__range), std::back_inserter(c));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
# endif
|
||||
|
||||
template <class... _Args>
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
#if _LIBCPP_STD_VER >= 17
|
||||
decltype(auto) emplace(_Args&&... __args)
|
||||
{ return c.emplace_back(_VSTD::forward<_Args>(__args)...);}
|
||||
#else
|
||||
void emplace(_Args&&... __args)
|
||||
{ c.emplace_back(_VSTD::forward<_Args>(__args)...);}
|
||||
#endif
|
||||
template <class... _Args>
|
||||
_LIBCPP_HIDE_FROM_ABI
|
||||
# if _LIBCPP_STD_VER >= 17
|
||||
decltype(auto)
|
||||
emplace(_Args&&... __args) {
|
||||
return c.emplace_back(std::forward<_Args>(__args)...);
|
||||
}
|
||||
# else
|
||||
void
|
||||
emplace(_Args&&... __args) {
|
||||
c.emplace_back(std::forward<_Args>(__args)...);
|
||||
}
|
||||
# endif
|
||||
#endif // _LIBCPP_CXX03_LANG
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
void pop() {c.pop_back();}
|
||||
_LIBCPP_HIDE_FROM_ABI void pop() { c.pop_back(); }
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
void swap(stack& __s)
|
||||
_NOEXCEPT_(__is_nothrow_swappable<container_type>::value)
|
||||
{
|
||||
using _VSTD::swap;
|
||||
swap(c, __s.c);
|
||||
}
|
||||
_LIBCPP_HIDE_FROM_ABI void swap(stack& __s) _NOEXCEPT_(__is_nothrow_swappable<container_type>::value) {
|
||||
using std::swap;
|
||||
swap(c, __s.c);
|
||||
}
|
||||
|
||||
_LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI const _Container& __get_container() const { return c; }
|
||||
_LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI const _Container& __get_container() const { return c; }
|
||||
|
||||
template <class _T1, class _OtherContainer>
|
||||
friend
|
||||
bool
|
||||
operator==(const stack<_T1, _OtherContainer>& __x, const stack<_T1, _OtherContainer>& __y);
|
||||
template <class _T1, class _OtherContainer>
|
||||
friend bool operator==(const stack<_T1, _OtherContainer>& __x, const stack<_T1, _OtherContainer>& __y);
|
||||
|
||||
template <class _T1, class _OtherContainer>
|
||||
friend
|
||||
bool
|
||||
operator< (const stack<_T1, _OtherContainer>& __x, const stack<_T1, _OtherContainer>& __y);
|
||||
template <class _T1, class _OtherContainer>
|
||||
friend bool operator<(const stack<_T1, _OtherContainer>& __x, const stack<_T1, _OtherContainer>& __y);
|
||||
};
|
||||
|
||||
#if _LIBCPP_STD_VER >= 17
|
||||
template<class _Container,
|
||||
class = enable_if_t<!__is_allocator<_Container>::value>
|
||||
>
|
||||
stack(_Container)
|
||||
-> stack<typename _Container::value_type, _Container>;
|
||||
template <class _Container, class = enable_if_t<!__is_allocator<_Container>::value> >
|
||||
stack(_Container) -> stack<typename _Container::value_type, _Container>;
|
||||
|
||||
template<class _Container,
|
||||
class _Alloc,
|
||||
class = enable_if_t<!__is_allocator<_Container>::value>,
|
||||
class = enable_if_t<uses_allocator<_Container, _Alloc>::value>
|
||||
>
|
||||
stack(_Container, _Alloc)
|
||||
-> stack<typename _Container::value_type, _Container>;
|
||||
template <class _Container,
|
||||
class _Alloc,
|
||||
class = enable_if_t<!__is_allocator<_Container>::value>,
|
||||
class = enable_if_t<uses_allocator<_Container, _Alloc>::value> >
|
||||
stack(_Container, _Alloc) -> stack<typename _Container::value_type, _Container>;
|
||||
#endif
|
||||
|
||||
#if _LIBCPP_STD_VER >= 23
|
||||
template<class _InputIterator,
|
||||
class = __enable_if_t<__has_input_iterator_category<_InputIterator>::value>>
|
||||
stack(_InputIterator, _InputIterator)
|
||||
-> stack<__iter_value_type<_InputIterator>>;
|
||||
template <class _InputIterator, class = __enable_if_t<__has_input_iterator_category<_InputIterator>::value>>
|
||||
stack(_InputIterator, _InputIterator) -> stack<__iter_value_type<_InputIterator>>;
|
||||
|
||||
template <ranges::input_range _Range>
|
||||
stack(from_range_t, _Range&&) -> stack<ranges::range_value_t<_Range>>;
|
||||
|
||||
template<class _InputIterator,
|
||||
class _Alloc,
|
||||
class = __enable_if_t<__has_input_iterator_category<_InputIterator>::value>,
|
||||
class = __enable_if_t<__is_allocator<_Alloc>::value>>
|
||||
template <class _InputIterator,
|
||||
class _Alloc,
|
||||
class = __enable_if_t<__has_input_iterator_category<_InputIterator>::value>,
|
||||
class = __enable_if_t<__is_allocator<_Alloc>::value>>
|
||||
stack(_InputIterator, _InputIterator, _Alloc)
|
||||
-> stack<__iter_value_type<_InputIterator>, deque<__iter_value_type<_InputIterator>, _Alloc>>;
|
||||
|
||||
template <ranges::input_range _Range,
|
||||
class _Alloc,
|
||||
class = __enable_if_t<__is_allocator<_Alloc>::value>>
|
||||
template <ranges::input_range _Range, class _Alloc, class = __enable_if_t<__is_allocator<_Alloc>::value>>
|
||||
stack(from_range_t, _Range&&, _Alloc)
|
||||
-> stack<ranges::range_value_t<_Range>, deque<ranges::range_value_t<_Range>, _Alloc>>;
|
||||
-> stack<ranges::range_value_t<_Range>, deque<ranges::range_value_t<_Range>, _Alloc>>;
|
||||
|
||||
#endif
|
||||
|
||||
template <class _Tp, class _Container>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
bool
|
||||
operator==(const stack<_Tp, _Container>& __x, const stack<_Tp, _Container>& __y)
|
||||
{
|
||||
return __x.c == __y.c;
|
||||
inline _LIBCPP_HIDE_FROM_ABI bool operator==(const stack<_Tp, _Container>& __x, const stack<_Tp, _Container>& __y) {
|
||||
return __x.c == __y.c;
|
||||
}
|
||||
|
||||
template <class _Tp, class _Container>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
bool
|
||||
operator< (const stack<_Tp, _Container>& __x, const stack<_Tp, _Container>& __y)
|
||||
{
|
||||
return __x.c < __y.c;
|
||||
inline _LIBCPP_HIDE_FROM_ABI bool operator<(const stack<_Tp, _Container>& __x, const stack<_Tp, _Container>& __y) {
|
||||
return __x.c < __y.c;
|
||||
}
|
||||
|
||||
template <class _Tp, class _Container>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
bool
|
||||
operator!=(const stack<_Tp, _Container>& __x, const stack<_Tp, _Container>& __y)
|
||||
{
|
||||
return !(__x == __y);
|
||||
inline _LIBCPP_HIDE_FROM_ABI bool operator!=(const stack<_Tp, _Container>& __x, const stack<_Tp, _Container>& __y) {
|
||||
return !(__x == __y);
|
||||
}
|
||||
|
||||
template <class _Tp, class _Container>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
bool
|
||||
operator> (const stack<_Tp, _Container>& __x, const stack<_Tp, _Container>& __y)
|
||||
{
|
||||
return __y < __x;
|
||||
inline _LIBCPP_HIDE_FROM_ABI bool operator>(const stack<_Tp, _Container>& __x, const stack<_Tp, _Container>& __y) {
|
||||
return __y < __x;
|
||||
}
|
||||
|
||||
template <class _Tp, class _Container>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
bool
|
||||
operator>=(const stack<_Tp, _Container>& __x, const stack<_Tp, _Container>& __y)
|
||||
{
|
||||
return !(__x < __y);
|
||||
inline _LIBCPP_HIDE_FROM_ABI bool operator>=(const stack<_Tp, _Container>& __x, const stack<_Tp, _Container>& __y) {
|
||||
return !(__x < __y);
|
||||
}
|
||||
|
||||
template <class _Tp, class _Container>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
bool
|
||||
operator<=(const stack<_Tp, _Container>& __x, const stack<_Tp, _Container>& __y)
|
||||
{
|
||||
return !(__y < __x);
|
||||
inline _LIBCPP_HIDE_FROM_ABI bool operator<=(const stack<_Tp, _Container>& __x, const stack<_Tp, _Container>& __y) {
|
||||
return !(__y < __x);
|
||||
}
|
||||
|
||||
#if _LIBCPP_STD_VER >= 20
|
||||
@@ -408,29 +351,26 @@ operator<=(const stack<_Tp, _Container>& __x, const stack<_Tp, _Container>& __y)
|
||||
template <class _Tp, three_way_comparable _Container>
|
||||
_LIBCPP_HIDE_FROM_ABI compare_three_way_result_t<_Container>
|
||||
operator<=>(const stack<_Tp, _Container>& __x, const stack<_Tp, _Container>& __y) {
|
||||
// clang 16 bug: declaring `friend operator<=>` causes "use of overloaded operator '*' is ambiguous" errors
|
||||
return __x.__get_container() <=> __y.__get_container();
|
||||
// clang 16 bug: declaring `friend operator<=>` causes "use of overloaded operator '*' is ambiguous" errors
|
||||
return __x.__get_container() <=> __y.__get_container();
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
template <class _Tp, class _Container>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
__enable_if_t<__is_swappable<_Container>::value, void>
|
||||
swap(stack<_Tp, _Container>& __x, stack<_Tp, _Container>& __y)
|
||||
_NOEXCEPT_(_NOEXCEPT_(__x.swap(__y)))
|
||||
{
|
||||
__x.swap(__y);
|
||||
template <class _Tp, class _Container, __enable_if_t<__is_swappable<_Container>::value, int> = 0>
|
||||
inline _LIBCPP_HIDE_FROM_ABI void swap(stack<_Tp, _Container>& __x, stack<_Tp, _Container>& __y)
|
||||
_NOEXCEPT_(_NOEXCEPT_(__x.swap(__y))) {
|
||||
__x.swap(__y);
|
||||
}
|
||||
|
||||
template <class _Tp, class _Container, class _Alloc>
|
||||
struct _LIBCPP_TEMPLATE_VIS uses_allocator<stack<_Tp, _Container>, _Alloc>
|
||||
: public uses_allocator<_Container, _Alloc>
|
||||
{
|
||||
struct _LIBCPP_TEMPLATE_VIS uses_allocator<stack<_Tp, _Container>, _Alloc> : public uses_allocator<_Container, _Alloc> {
|
||||
};
|
||||
|
||||
_LIBCPP_END_NAMESPACE_STD
|
||||
|
||||
_LIBCPP_POP_MACROS
|
||||
|
||||
#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
|
||||
# include <concepts>
|
||||
# include <functional>
|
||||
|
||||
Reference in New Issue
Block a user