diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2021-11-19 20:06:13 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2021-11-19 20:06:13 +0000 |
| commit | c0981da47d5696fe36474fcf86b4ce03ae3ff818 (patch) | |
| tree | f42add1021b9f2ac6a69ac7cf6c4499962739a45 /libcxx/include/stack | |
| parent | 344a3780b2e33f6ca763666c380202b18aab72a3 (diff) | |
Diffstat (limited to 'libcxx/include/stack')
| -rw-r--r-- | libcxx/include/stack | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/libcxx/include/stack b/libcxx/include/stack index aefef31ac97b..5d959c33c742 100644 --- a/libcxx/include/stack +++ b/libcxx/include/stack @@ -1,5 +1,5 @@ // -*- C++ -*- -//===---------------------------- stack -----------------------------------===// +//===----------------------------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -158,28 +158,28 @@ public: template <class _Alloc> _LIBCPP_INLINE_VISIBILITY explicit stack(const _Alloc& __a, - _EnableIf<uses_allocator<container_type, _Alloc>::value>* = 0) + __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, - _EnableIf<uses_allocator<container_type, _Alloc>::value>* = 0) + __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, - _EnableIf<uses_allocator<container_type, _Alloc>::value>* = 0) + __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, - _EnableIf<uses_allocator<container_type, _Alloc>::value>* = 0) + __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, - _EnableIf<uses_allocator<container_type, _Alloc>::value>* = 0) + __enable_if_t<uses_allocator<container_type, _Alloc>::value>* = 0) : c(_VSTD::move(__s.c), __a) {} #endif // _LIBCPP_CXX03_LANG @@ -231,17 +231,17 @@ public: operator< (const stack<T1, _C1>& __x, const stack<T1, _C1>& __y); }; -#ifndef _LIBCPP_HAS_NO_DEDUCTION_GUIDES +#if _LIBCPP_STD_VER >= 17 template<class _Container, - class = _EnableIf<!__is_allocator<_Container>::value> + class = enable_if_t<!__is_allocator<_Container>::value> > stack(_Container) -> stack<typename _Container::value_type, _Container>; template<class _Container, class _Alloc, - class = _EnableIf<!__is_allocator<_Container>::value>, - class = _EnableIf<uses_allocator<_Container, _Alloc>::value> + 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>; @@ -297,7 +297,7 @@ operator<=(const stack<_Tp, _Container>& __x, const stack<_Tp, _Container>& __y) template <class _Tp, class _Container> inline _LIBCPP_INLINE_VISIBILITY -_EnableIf<__is_swappable<_Container>::value, void> +__enable_if_t<__is_swappable<_Container>::value, void> swap(stack<_Tp, _Container>& __x, stack<_Tp, _Container>& __y) _NOEXCEPT_(_NOEXCEPT_(__x.swap(__y))) { |
