summaryrefslogtreecommitdiffstats
path: root/contrib/libstdc++/include/bits/stl_stack.h
diff options
context:
space:
mode:
authorkan <kan@FreeBSD.org>2007-05-19 01:25:07 +0000
committerkan <kan@FreeBSD.org>2007-05-19 01:25:07 +0000
commit7865836f4b0f698454c31b4593effcb032c22c1e (patch)
treeea6c2718dc1e45ed535d194df808ef31f0ebac92 /contrib/libstdc++/include/bits/stl_stack.h
parent1f9ea4d0a40cca64d60cf4dab152349da7b9dddf (diff)
downloadFreeBSD-src-7865836f4b0f698454c31b4593effcb032c22c1e.zip
FreeBSD-src-7865836f4b0f698454c31b4593effcb032c22c1e.tar.gz
GCC 4.2.0 release C++ standard library and runtime support code.
Diffstat (limited to 'contrib/libstdc++/include/bits/stl_stack.h')
-rw-r--r--contrib/libstdc++/include/bits/stl_stack.h27
1 files changed, 8 insertions, 19 deletions
diff --git a/contrib/libstdc++/include/bits/stl_stack.h b/contrib/libstdc++/include/bits/stl_stack.h
index ada50ee..f5b41fa 100644
--- a/contrib/libstdc++/include/bits/stl_stack.h
+++ b/contrib/libstdc++/include/bits/stl_stack.h
@@ -1,6 +1,7 @@
// Stack implementation -*- C++ -*-
-// Copyright (C) 2001, 2002, 2004 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006
+// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -15,7 +16,7 @@
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
// As a special exception, you may use this file as part of a free software
@@ -64,20 +65,7 @@
#include <bits/concept_check.h>
#include <debug/debug.h>
-namespace std
-{
- // Forward declarations of operators == and <, needed for friend
- // declaration.
- template<typename _Tp, typename _Sequence = deque<_Tp> >
- class stack;
-
- template<typename _Tp, typename _Seq>
- inline bool
- operator==(const stack<_Tp,_Seq>& __x, const stack<_Tp,_Seq>& __y);
-
- template<typename _Tp, typename _Seq>
- inline bool
- operator<(const stack<_Tp,_Seq>& __x, const stack<_Tp,_Seq>& __y);
+_GLIBCXX_BEGIN_NAMESPACE(std)
/**
* @brief A standard container giving FILO behavior.
@@ -106,7 +94,7 @@ namespace std
* push, @c pop, and @c top, which are standard %stack/FILO
* operations.
*/
- template<typename _Tp, typename _Sequence>
+ template<typename _Tp, typename _Sequence = deque<_Tp> >
class stack
{
// concept requirements
@@ -141,7 +129,7 @@ namespace std
*/
explicit
stack(const _Sequence& __c = _Sequence())
- : c(__c) {}
+ : c(__c) { }
/**
* Returns true if the %stack is empty.
@@ -267,6 +255,7 @@ namespace std
inline bool
operator>=(const stack<_Tp, _Seq>& __x, const stack<_Tp, _Seq>& __y)
{ return !(__x < __y); }
-} // namespace std
+
+_GLIBCXX_END_NAMESPACE
#endif /* _STACK_H */
OpenPOWER on IntegriCloud