diff libcxx/include/stack @ 207:2e18cbf3894f

LLVM12
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Tue, 08 Jun 2021 06:07:14 +0900
parents 1d019706d866
children 5f17cb93ff66
line wrap: on
line diff
--- a/libcxx/include/stack	Mon May 25 11:55:54 2020 +0900
+++ b/libcxx/include/stack	Tue Jun 08 06:07:14 2021 +0900
@@ -148,7 +148,7 @@
 
     _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 +156,30 @@
     template <class _Alloc>
         _LIBCPP_INLINE_VISIBILITY
         explicit stack(const _Alloc& __a,
-                       typename enable_if<uses_allocator<container_type,
-                                                         _Alloc>::value>::type* = 0)
+                       _EnableIf<uses_allocator<container_type, _Alloc>::value>* = 0)
             : c(__a) {}
     template <class _Alloc>
         _LIBCPP_INLINE_VISIBILITY
         stack(const container_type& __c, const _Alloc& __a,
-              typename enable_if<uses_allocator<container_type,
-                                                _Alloc>::value>::type* = 0)
+              _EnableIf<uses_allocator<container_type, _Alloc>::value>* = 0)
             : c(__c, __a) {}
     template <class _Alloc>
         _LIBCPP_INLINE_VISIBILITY
         stack(const stack& __s, const _Alloc& __a,
-              typename enable_if<uses_allocator<container_type,
-                                                _Alloc>::value>::type* = 0)
+              _EnableIf<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,
-              typename enable_if<uses_allocator<container_type,
-                                                _Alloc>::value>::type* = 0)
+              _EnableIf<uses_allocator<container_type, _Alloc>::value>* = 0)
             : c(_VSTD::move(__c), __a) {}
     template <class _Alloc>
         _LIBCPP_INLINE_VISIBILITY
         stack(stack&& __s, const _Alloc& __a,
-              typename enable_if<uses_allocator<container_type,
-                                                _Alloc>::value>::type* = 0)
+              _EnableIf<uses_allocator<container_type, _Alloc>::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 +205,7 @@
         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 +231,15 @@
 
 #ifndef _LIBCPP_HAS_NO_DEDUCTION_GUIDES
 template<class _Container,
-         class = typename enable_if<!__is_allocator<_Container>::value, nullptr_t>::type
+         class = _EnableIf<!__is_allocator<_Container>::value>
 >
 stack(_Container)
     -> stack<typename _Container::value_type, _Container>;
 
 template<class _Container,
          class _Alloc,
-         class = typename enable_if<!__is_allocator<_Container>::value, nullptr_t>::type,
-         class = typename enable_if< __is_allocator<_Alloc>::value, nullptr_t>::type
+         class = _EnableIf<!__is_allocator<_Container>::value>,
+         class = _EnableIf<__is_allocator<_Alloc>::value>
          >
 stack(_Container, _Alloc)
     -> stack<typename _Container::value_type, _Container>;
@@ -300,10 +295,7 @@
 
 template <class _Tp, class _Container>
 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 +310,4 @@
 
 _LIBCPP_END_NAMESPACE_STD
 
-#endif  // _LIBCPP_STACK
+#endif // _LIBCPP_STACK