From e060133553c97efc352d8781f1f06f89eda7adbc Mon Sep 17 00:00:00 2001 From: Howard Hinnant Date: Thu, 23 Sep 2010 17:31:07 +0000 Subject: visibility-decoration. llvm-svn: 114671 --- libcxx/include/stack | 40 ++++++++++++++++++++++++++++++---------- 1 file changed, 30 insertions(+), 10 deletions(-) (limited to 'libcxx/include/stack') diff --git a/libcxx/include/stack b/libcxx/include/stack index 7737379547f..3f428054be6 100644 --- a/libcxx/include/stack +++ b/libcxx/include/stack @@ -92,7 +92,7 @@ bool operator< (const stack<_Tp, _Container>& __x, const stack<_Tp, _Container>& __y); template > -class stack +class _LIBCPP_VISIBLE stack { public: typedef _Container container_type; @@ -105,56 +105,76 @@ protected: container_type c; public: + _LIBCPP_INLINE_VISIBILITY stack() : c() {} + _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(_STD::move(__c)) {} + _LIBCPP_INLINE_VISIBILITY stack(stack&& __s) : c(_STD::move(__s.c)) {} + _LIBCPP_INLINE_VISIBILITY stack& operator=(stack&& __s) {c = _STD::move(__s.c); return *this;} #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES template + _LIBCPP_INLINE_VISIBILITY explicit stack(const _Alloc& __a, typename enable_if::value>::type* = 0) : c(__a) {} template + _LIBCPP_INLINE_VISIBILITY stack(const container_type& __c, const _Alloc& __a, typename enable_if::value>::type* = 0) : c(__c, __a) {} template + _LIBCPP_INLINE_VISIBILITY stack(const stack& __s, const _Alloc& __a, typename enable_if::value>::type* = 0) : c(__s.c, __a) {} #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template + _LIBCPP_INLINE_VISIBILITY stack(container_type&& __c, const _Alloc& __a, typename enable_if::value>::type* = 0) : c(_STD::move(__c), __a) {} template + _LIBCPP_INLINE_VISIBILITY stack(stack&& __s, const _Alloc& __a, typename enable_if::value>::type* = 0) : c(_STD::move(__s.c), __a) {} #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES + _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_INLINE_VISIBILITY void push(const value_type& __v) {c.push_back(__v);} #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES + _LIBCPP_INLINE_VISIBILITY void push(value_type&& __v) {c.push_back(_STD::move(__v));} #ifndef _LIBCPP_HAS_NO_VARIADICS - template void emplace(_Args&&... __args) + template + _LIBCPP_INLINE_VISIBILITY + void emplace(_Args&&... __args) {c.emplace_back(_STD::forward<_Args>(__args)...);} #endif // _LIBCPP_HAS_NO_VARIADICS #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES + _LIBCPP_INLINE_VISIBILITY void pop() {c.pop_back();} + _LIBCPP_INLINE_VISIBILITY void swap(stack& __s) { using _STD::swap; @@ -173,7 +193,7 @@ public: }; template -inline +inline _LIBCPP_INLINE_VISIBILITY bool operator==(const stack<_Tp, _Container>& __x, const stack<_Tp, _Container>& __y) { @@ -181,7 +201,7 @@ operator==(const stack<_Tp, _Container>& __x, const stack<_Tp, _Container>& __y) } template -inline +inline _LIBCPP_INLINE_VISIBILITY bool operator< (const stack<_Tp, _Container>& __x, const stack<_Tp, _Container>& __y) { @@ -189,7 +209,7 @@ operator< (const stack<_Tp, _Container>& __x, const stack<_Tp, _Container>& __y) } template -inline +inline _LIBCPP_INLINE_VISIBILITY bool operator!=(const stack<_Tp, _Container>& __x, const stack<_Tp, _Container>& __y) { @@ -197,7 +217,7 @@ operator!=(const stack<_Tp, _Container>& __x, const stack<_Tp, _Container>& __y) } template -inline +inline _LIBCPP_INLINE_VISIBILITY bool operator> (const stack<_Tp, _Container>& __x, const stack<_Tp, _Container>& __y) { @@ -205,7 +225,7 @@ operator> (const stack<_Tp, _Container>& __x, const stack<_Tp, _Container>& __y) } template -inline +inline _LIBCPP_INLINE_VISIBILITY bool operator>=(const stack<_Tp, _Container>& __x, const stack<_Tp, _Container>& __y) { @@ -213,7 +233,7 @@ operator>=(const stack<_Tp, _Container>& __x, const stack<_Tp, _Container>& __y) } template -inline +inline _LIBCPP_INLINE_VISIBILITY bool operator<=(const stack<_Tp, _Container>& __x, const stack<_Tp, _Container>& __y) { @@ -221,7 +241,7 @@ operator<=(const stack<_Tp, _Container>& __x, const stack<_Tp, _Container>& __y) } template -inline +inline _LIBCPP_INLINE_VISIBILITY void swap(stack<_Tp, _Container>& __x, stack<_Tp, _Container>& __y) { @@ -229,7 +249,7 @@ swap(stack<_Tp, _Container>& __x, stack<_Tp, _Container>& __y) } template -struct uses_allocator, _Alloc> +struct _LIBCPP_VISIBLE uses_allocator, _Alloc> : public uses_allocator<_Container, _Alloc> { }; -- cgit v1.2.3