// Queue implementation -*- C++ -*-
-// Copyright (C) 2001, 2002, 2003, 2004, 2005
+// 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
template<typename _Tp, typename _Seq>
inline bool
- operator==(const queue<_Tp,_Seq>&, const queue<_Tp,_Seq>&);
+ operator==(const queue<_Tp, _Seq>&, const queue<_Tp, _Seq>&);
template<typename _Tp, typename _Seq>
inline bool
- operator<(const queue<_Tp,_Seq>&, const queue<_Tp,_Seq>&);
+ operator<(const queue<_Tp, _Seq>&, const queue<_Tp, _Seq>&);
/**
* @brief A standard container giving FIFO behavior.
* linear in the size of the sequences, and queues are considered equivalent
* if their sequences compare equal.
*/
- template<typename _Tp, typename _Sequence>
+ template<typename _Tp, typename _Seq>
inline bool
- operator==(const queue<_Tp,_Sequence>& __x,
- const queue<_Tp,_Sequence>& __y)
+ operator==(const queue<_Tp, _Seq>& __x, const queue<_Tp, _Seq>& __y)
{ return __x.c == __y.c; }
/**
* std::lexicographical_compare() is usually used to make the
* determination.
*/
- template<typename _Tp, typename _Sequence>
+ template<typename _Tp, typename _Seq>
inline bool
- operator<(const queue<_Tp,_Sequence>& __x, const queue<_Tp,_Sequence>& __y)
+ operator<(const queue<_Tp, _Seq>& __x, const queue<_Tp, _Seq>& __y)
{ return __x.c < __y.c; }
/// Based on operator==
- template<typename _Tp, typename _Sequence>
+ template<typename _Tp, typename _Seq>
inline bool
- operator!=(const queue<_Tp,_Sequence>& __x,
- const queue<_Tp,_Sequence>& __y)
+ operator!=(const queue<_Tp, _Seq>& __x, const queue<_Tp, _Seq>& __y)
{ return !(__x == __y); }
/// Based on operator<
- template<typename _Tp, typename _Sequence>
+ template<typename _Tp, typename _Seq>
inline bool
- operator>(const queue<_Tp,_Sequence>& __x, const queue<_Tp,_Sequence>& __y)
+ operator>(const queue<_Tp, _Seq>& __x, const queue<_Tp, _Seq>& __y)
{ return __y < __x; }
/// Based on operator<
- template<typename _Tp, typename _Sequence>
+ template<typename _Tp, typename _Seq>
inline bool
- operator<=(const queue<_Tp,_Sequence>& __x,
- const queue<_Tp,_Sequence>& __y)
+ operator<=(const queue<_Tp, _Seq>& __x, const queue<_Tp, _Seq>& __y)
{ return !(__y < __x); }
/// Based on operator<
- template<typename _Tp, typename _Sequence>
+ template<typename _Tp, typename _Seq>
inline bool
- operator>=(const queue<_Tp,_Sequence>& __x,
- const queue<_Tp,_Sequence>& __y)
+ operator>=(const queue<_Tp, _Seq>& __x, const queue<_Tp, _Seq>& __y)
{ return !(__x < __y); }
/**
__glibcxx_class_requires(_Sequence, _SequenceConcept)
__glibcxx_class_requires(_Sequence, _RandomAccessContainerConcept)
__glibcxx_class_requires2(_Tp, _Sequence_value_type, _SameTypeConcept)
- __glibcxx_class_requires4(_Compare, bool, _Tp,_Tp,_BinaryFunctionConcept)
+ __glibcxx_class_requires4(_Compare, bool, _Tp, _Tp,
+ _BinaryFunctionConcept)
public:
typedef typename _Sequence::value_type value_type;
* Returns true if the %queue is empty.
*/
bool
- empty() const { return c.empty(); }
+ empty() const
+ { return c.empty(); }
/** Returns the number of elements in the %queue. */
size_type
- size() const { return c.size(); }
+ size() const
+ { return c.size(); }
/**
* Returns a read-only (constant) reference to the data at the first
// Stack implementation -*- C++ -*-
-// Copyright (C) 2001, 2002, 2004, 2005 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
template<typename _Tp, typename _Seq>
inline bool
- operator==(const stack<_Tp,_Seq>& __x, const stack<_Tp,_Seq>& __y);
+ 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);
+ operator<(const stack<_Tp, _Seq>& __x, const stack<_Tp, _Seq>& __y);
/**
* @brief A standard container giving FILO behavior.
*/
explicit
stack(const _Sequence& __c = _Sequence())
- : c(__c) {}
+ : c(__c) { }
/**
* Returns true if the %stack is empty.