Cleanup _LIBCPP_HAS_NO_<c++11-feature> macro uses in std::stack.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@300602 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/include/stack b/include/stack
index c797ea5..b2d4e23 100644
--- a/include/stack
+++ b/include/stack
@@ -126,29 +126,28 @@
_LIBCPP_INLINE_VISIBILITY
stack(const stack& __q) : c(__q.c) {}
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
+ _LIBCPP_INLINE_VISIBILITY
+ 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)) {}
-#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
_LIBCPP_INLINE_VISIBILITY
- stack& operator=(const stack& __q) {c = __q.c; return *this;}
-
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
- _LIBCPP_INLINE_VISIBILITY
stack& operator=(stack&& __q)
_NOEXCEPT_(is_nothrow_move_assignable<container_type>::value)
{c = _VSTD::move(__q.c); return *this;}
-#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
+
+ _LIBCPP_INLINE_VISIBILITY
+ explicit stack(container_type&& __c) : c(_VSTD::move(__c)) {}
+#endif // _LIBCPP_CXX03_LANG
_LIBCPP_INLINE_VISIBILITY
explicit stack(const container_type& __c) : c(__c) {}
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
- _LIBCPP_INLINE_VISIBILITY
- explicit stack(container_type&& __c) : c(_VSTD::move(__c)) {}
-#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
+
template <class _Alloc>
_LIBCPP_INLINE_VISIBILITY
explicit stack(const _Alloc& __a,
@@ -167,7 +166,7 @@
typename enable_if<uses_allocator<container_type,
_Alloc>::value>::type* = 0)
: c(__s.c, __a) {}
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
+#ifndef _LIBCPP_CXX03_LANG
template <class _Alloc>
_LIBCPP_INLINE_VISIBILITY
stack(container_type&& __c, const _Alloc& __a,
@@ -180,7 +179,7 @@
typename enable_if<uses_allocator<container_type,
_Alloc>::value>::type* = 0)
: c(_VSTD::move(__s.c), __a) {}
-#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
+#endif // _LIBCPP_CXX03_LANG
_LIBCPP_INLINE_VISIBILITY
bool empty() const {return c.empty();}
@@ -193,10 +192,10 @@
_LIBCPP_INLINE_VISIBILITY
void push(const value_type& __v) {c.push_back(__v);}
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
+#ifndef _LIBCPP_CXX03_LANG
_LIBCPP_INLINE_VISIBILITY
void push(value_type&& __v) {c.push_back(_VSTD::move(__v));}
-#ifndef _LIBCPP_HAS_NO_VARIADICS
+
template <class... _Args>
_LIBCPP_INLINE_VISIBILITY
#if _LIBCPP_STD_VER > 14
@@ -206,8 +205,8 @@
void emplace(_Args&&... __args)
{ c.emplace_back(_VSTD::forward<_Args>(__args)...);}
#endif
-#endif // _LIBCPP_HAS_NO_VARIADICS
-#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
+#endif // _LIBCPP_CXX03_LANG
+
_LIBCPP_INLINE_VISIBILITY
void pop() {c.pop_back();}