// Stack implementation -*- C++ -*-
-// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
+// 2010, 2011
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
* purpose. It is provided "as is" without express or implied warranty.
*/
-/** @file stl_stack.h
+/** @file bits/stl_stack.h
* This is an internal header file, included by other library headers.
- * You should not attempt to use it directly.
+ * Do not attempt to use it directly. @headername{stack}
*/
#ifndef _STL_STACK_H
#include <bits/concept_check.h>
#include <debug/debug.h>
-_GLIBCXX_BEGIN_NAMESPACE(std)
+namespace std _GLIBCXX_VISIBILITY(default)
+{
+_GLIBCXX_BEGIN_NAMESPACE_VERSION
/**
* @brief A standard container giving FILO behavior.
#ifdef __GXX_EXPERIMENTAL_CXX0X__
void
swap(stack& __s)
- { c.swap(__s.c); }
+ noexcept(noexcept(swap(c, __s.c)))
+ {
+ using std::swap;
+ swap(c, __s.c);
+ }
#endif
};
template<typename _Tp, typename _Seq>
inline void
swap(stack<_Tp, _Seq>& __x, stack<_Tp, _Seq>& __y)
+ noexcept(noexcept(__x.swap(__y)))
{ __x.swap(__y); }
+
+ template<typename _Tp, typename _Seq, typename _Alloc>
+ struct uses_allocator<stack<_Tp, _Seq>, _Alloc>
+ : public uses_allocator<_Seq, _Alloc>::type { };
#endif
-_GLIBCXX_END_NAMESPACE
+_GLIBCXX_END_NAMESPACE_VERSION
+} // namespace
#endif /* _STL_STACK_H */