diff options
Diffstat (limited to 'contrib/libc++/include/stack')
-rw-r--r-- | contrib/libc++/include/stack | 33 |
1 files changed, 16 insertions, 17 deletions
diff --git a/contrib/libc++/include/stack b/contrib/libc++/include/stack index c797ea5..b2d4e23 100644 --- a/contrib/libc++/include/stack +++ b/contrib/libc++/include/stack @@ -126,29 +126,28 @@ public: _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(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 +#endif // _LIBCPP_CXX03_LANG + + _LIBCPP_INLINE_VISIBILITY + explicit stack(const container_type& __c) : c(__c) {} + template <class _Alloc> _LIBCPP_INLINE_VISIBILITY explicit stack(const _Alloc& __a, @@ -167,7 +166,7 @@ public: 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 @@ public: 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 @@ public: _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 @@ public: 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();} |