Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/llvm/llvm-project.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHoward Hinnant <hhinnant@apple.com>2010-09-23 21:31:07 +0400
committerHoward Hinnant <hhinnant@apple.com>2010-09-23 21:31:07 +0400
commite060133553c97efc352d8781f1f06f89eda7adbc (patch)
tree83fa6598c9603fb3543e51b76b3d874f0348b881 /libcxx/include/stack
parent81b59834c28498be741ef4e1d5c90a37dbe90786 (diff)
visibility-decoration.
llvm-svn: 114671
Diffstat (limited to 'libcxx/include/stack')
-rw-r--r--libcxx/include/stack40
1 files changed, 30 insertions, 10 deletions
diff --git a/libcxx/include/stack b/libcxx/include/stack
index 7737379547f3..3f428054be60 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 _Tp, class _Container = deque<_Tp> >
-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 <class _Alloc>
+ _LIBCPP_INLINE_VISIBILITY
explicit stack(const _Alloc& __a,
typename enable_if<uses_allocator<container_type,
_Alloc>::value>::type* = 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)
: 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)
: c(__s.c, __a) {}
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
template <class _Alloc>
+ _LIBCPP_INLINE_VISIBILITY
stack(container_type&& __c, const _Alloc& __a,
typename enable_if<uses_allocator<container_type,
_Alloc>::value>::type* = 0)
: c(_STD::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)
: 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 <class... _Args> void emplace(_Args&&... __args)
+ template <class... _Args>
+ _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 <class _Tp, class _Container>
-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 <class _Tp, class _Container>
-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 <class _Tp, class _Container>
-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 <class _Tp, class _Container>
-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 <class _Tp, class _Container>
-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 <class _Tp, class _Container>
-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 <class _Tp, class _Container>
-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 <class _Tp, class _Container, class _Alloc>
-struct uses_allocator<stack<_Tp, _Container>, _Alloc>
+struct _LIBCPP_VISIBLE uses_allocator<stack<_Tp, _Container>, _Alloc>
: public uses_allocator<_Container, _Alloc>
{
};