deque.tcc, [...]: Re-indent contents of namespace std, re-wrap comment lines as necessary.
2002-08-09 Phil Edwards <pme@gcc.gnu.org> * include/bits/deque.tcc, include/bits/list.tcc, include/bits/stl_deque.h, include/bits/stl_iterator_base_funcs.h, include/bits/stl_list.h, include/bits/stl_map.h, include/bits/stl_multimap.h, include/bits/stl_queue.h, include/bits/stl_stack.h, include/bits/stl_vector.h, include/bits/vector.tcc: Re-indent contents of namespace std, re-wrap comment lines as necessary. From-SVN: r56165
This commit is contained in:
parent
2043c38e8d
commit
3971a4d235
12 changed files with 6345 additions and 6381 deletions
|
@ -1,3 +1,13 @@
|
|||
2002-08-09 Phil Edwards <pme@gcc.gnu.org>
|
||||
|
||||
* include/bits/deque.tcc, include/bits/list.tcc,
|
||||
include/bits/stl_deque.h, include/bits/stl_iterator_base_funcs.h,
|
||||
include/bits/stl_list.h, include/bits/stl_map.h,
|
||||
include/bits/stl_multimap.h, include/bits/stl_queue.h,
|
||||
include/bits/stl_stack.h, include/bits/stl_vector.h,
|
||||
include/bits/vector.tcc: Re-indent contents of namespace std,
|
||||
re-wrap comment lines as necessary.
|
||||
|
||||
2002-08-08 Danny Smith <dannysmith@users.sourceforge.net>
|
||||
Benjamin Kosnik <bkoz@redhat.com>
|
||||
|
||||
|
|
|
@ -61,12 +61,8 @@
|
|||
#ifndef __GLIBCPP_INTERNAL_DEQUE_TCC
|
||||
#define __GLIBCPP_INTERNAL_DEQUE_TCC
|
||||
|
||||
// Since this entire file is within namespace std, there's no reason to
|
||||
// waste two spaces along the left column. Thus the leading indentation is
|
||||
// slightly violated from here on.
|
||||
namespace std
|
||||
{
|
||||
|
||||
template <typename _Tp, typename _Alloc>
|
||||
deque<_Tp,_Alloc>&
|
||||
deque<_Tp,_Alloc>::
|
||||
|
@ -777,7 +773,6 @@ template <typename _Tp, typename _Alloc>
|
|||
_M_start._M_set_node(__new_nstart);
|
||||
_M_finish._M_set_node(__new_nstart + __old_num_nodes - 1);
|
||||
}
|
||||
|
||||
} // namespace std
|
||||
|
||||
#endif /* __GLIBCPP_INTERNAL_DEQUE_TCC */
|
||||
|
|
|
@ -61,12 +61,8 @@
|
|||
#ifndef __GLIBCPP_INTERNAL_LIST_TCC
|
||||
#define __GLIBCPP_INTERNAL_LIST_TCC
|
||||
|
||||
// Since this entire file is within namespace std, there's no reason to
|
||||
// waste two spaces along the left column. Thus the leading indentation is
|
||||
// slightly violated from here on.
|
||||
namespace std
|
||||
{
|
||||
|
||||
template<typename _Tp, typename _Alloc>
|
||||
void
|
||||
_List_base<_Tp,_Alloc>::
|
||||
|
@ -367,8 +363,6 @@ template<typename _Tp, typename _Alloc>
|
|||
swap(__counter[__fill-1]);
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace std
|
||||
|
||||
#endif /* __GLIBCPP_INTERNAL_LIST_TCC */
|
||||
|
||||
|
|
|
@ -65,12 +65,8 @@
|
|||
#include <bits/stl_iterator_base_types.h>
|
||||
#include <bits/stl_iterator_base_funcs.h>
|
||||
|
||||
// Since this entire file is within namespace std, there's no reason to
|
||||
// waste two spaces along the left column. Thus the leading indentation is
|
||||
// slightly violated from here on.
|
||||
namespace std
|
||||
{
|
||||
|
||||
/**
|
||||
* @if maint
|
||||
* @brief This function controls the size of memory nodes.
|
||||
|
@ -435,11 +431,12 @@ protected:
|
|||
/**
|
||||
* @if maint
|
||||
* Deque base class. Using _Alloc_traits in the instantiation of the parent
|
||||
* class provides the compile-time dispatching mentioned in the parent's docs.
|
||||
* This class provides the unified face for %deque's allocation.
|
||||
* class provides the compile-time dispatching mentioned in the parent's
|
||||
* docs. This class provides the unified face for %deque's allocation.
|
||||
*
|
||||
* Nothing in this class ever constructs or destroys an actual Tp element.
|
||||
* (Deque handles that itself.) Only/All memory management is performed here.
|
||||
* (Deque handles that itself.) Only/All memory management is performed
|
||||
* here.
|
||||
* @endif
|
||||
*/
|
||||
template <typename _Tp, typename _Alloc>
|
||||
|
@ -486,7 +483,8 @@ _Deque_base<_Tp,_Alloc>::~_Deque_base()
|
|||
/**
|
||||
* @if maint
|
||||
* @brief Layout storage.
|
||||
* @param num_elements The count of T's for which to allocate space at first.
|
||||
* @param num_elements The count of T's for which to allocate space
|
||||
* at first.
|
||||
* @return Nothing.
|
||||
*
|
||||
* The initial underlying memory layout is a bit complicated...
|
||||
|
@ -563,10 +561,10 @@ _Deque_base<_Tp,_Alloc>::_M_destroy_nodes(_Tp** __nstart, _Tp** __nfinish)
|
|||
* <a href="tables.html#67">sequence</a>, including the
|
||||
* <a href="tables.html#68">optional sequence requirements</a>.
|
||||
*
|
||||
* In previous HP/SGI versions of deque, there was an extra template parameter
|
||||
* so users could control the node size. This extension turned out to violate
|
||||
* the C++ standard (it can be detected using template template parameters),
|
||||
* and it was removed.
|
||||
* In previous HP/SGI versions of deque, there was an extra template
|
||||
* parameter so users could control the node size. This extension turned
|
||||
* out to violate the C++ standard (it can be detected using template
|
||||
* template parameters), and it was removed.
|
||||
*
|
||||
* @if maint
|
||||
* Here's how a deque<Tp> manages memory. Each deque has 4 members:
|
||||
|
@ -612,8 +610,8 @@ _Deque_base<_Tp,_Alloc>::_M_destroy_nodes(_Tp** __nstart, _Tp** __nfinish)
|
|||
* an empty deque must have one node, a deque with <N elements (where N is
|
||||
* the node buffer size) must have one node, a deque with N through (2N-1)
|
||||
* elements must have two nodes, etc.
|
||||
* - For every node other than start.node and finish.node, every element in the
|
||||
* node is an initialized object. If start.node == finish.node, then
|
||||
* - For every node other than start.node and finish.node, every element in
|
||||
* the node is an initialized object. If start.node == finish.node, then
|
||||
* [start.cur, finish.cur) are initialized objects, and the elements outside
|
||||
* that range are uninitialized storage. Otherwise, [start.cur, start.last)
|
||||
* and [finish.first, finish.cur) are initialized objects, and [start.first,
|
||||
|
@ -621,16 +619,18 @@ _Deque_base<_Tp,_Alloc>::_M_destroy_nodes(_Tp** __nstart, _Tp** __nfinish)
|
|||
* - [%map, %map + map_size) is a valid, non-empty range.
|
||||
* - [start.node, finish.node] is a valid range contained within
|
||||
* [%map, %map + map_size).
|
||||
* - A pointer in the range [%map, %map + map_size) points to an allocated node
|
||||
* if and only if the pointer is in the range [start.node, finish.node].
|
||||
* - A pointer in the range [%map, %map + map_size) points to an allocated
|
||||
* node if and only if the pointer is in the range
|
||||
* [start.node, finish.node].
|
||||
*
|
||||
* Here's the magic: nothing in deque is "aware" of the discontiguous storage!
|
||||
* Here's the magic: nothing in deque is "aware" of the discontiguous
|
||||
* storage!
|
||||
*
|
||||
* The memory setup and layout occurs in the parent, _Base, and the iterator
|
||||
* class is entirely responsible for "leaping" from one node to the next. All
|
||||
* the implementation routines for deque itself work only through the start
|
||||
* and finish iterators. This keeps the routines simple and sane, and we can
|
||||
* use other standard algorithms as well.
|
||||
* class is entirely responsible for "leaping" from one node to the next.
|
||||
* All the implementation routines for deque itself work only through the
|
||||
* start and finish iterators. This keeps the routines simple and sane,
|
||||
* and we can use other standard algorithms as well.
|
||||
* @endif
|
||||
*/
|
||||
template <typename _Tp, typename _Alloc = allocator<_Tp> >
|
||||
|
@ -758,8 +758,8 @@ public:
|
|||
* @brief %Deque assignment operator.
|
||||
* @param x A %deque of identical element and allocator types.
|
||||
*
|
||||
* All the elements of @a x are copied, but unlike the copy constructor, the
|
||||
* allocator object is not copied.
|
||||
* All the elements of @a x are copied, but unlike the copy constructor,
|
||||
* the allocator object is not copied.
|
||||
*/
|
||||
deque&
|
||||
operator=(const deque& __x);
|
||||
|
@ -1030,9 +1030,9 @@ public:
|
|||
* @brief Add data to the front of the %deque.
|
||||
*
|
||||
* This is a typical stack operation. The function creates a
|
||||
* default-constructed element at the front of the %deque. Due to the nature
|
||||
* of a %deque this operation can be done in constant time. You should
|
||||
* consider using push_front(value_type()) instead.
|
||||
* default-constructed element at the front of the %deque. Due to the
|
||||
* nature of a %deque this operation can be done in constant time. You
|
||||
* should consider using push_front(value_type()) instead.
|
||||
*
|
||||
* @note This was deprecated in 3.2 and will be removed in 3.4. You must
|
||||
* define @c _GLIBCPP_DEPRECATED to make this visible in 3.2; see
|
||||
|
@ -1214,7 +1214,8 @@ public:
|
|||
/**
|
||||
* @brief Remove a range of elements.
|
||||
* @param first Iterator pointing to the first element to be erased.
|
||||
* @param last Iterator pointing to one past the last element to be erased.
|
||||
* @param last Iterator pointing to one past the last element to be
|
||||
* erased.
|
||||
* @return An iterator pointing to the element pointed to by @a last
|
||||
* prior to erasing (or end()).
|
||||
*
|
||||
|
@ -1270,7 +1271,8 @@ protected:
|
|||
// called by the range constructor to implement [23.1.1]/9
|
||||
template<typename _InputIter>
|
||||
void
|
||||
_M_initialize_dispatch(_InputIter __first, _InputIter __last, __false_type)
|
||||
_M_initialize_dispatch(_InputIter __first, _InputIter __last,
|
||||
__false_type)
|
||||
{
|
||||
typedef typename iterator_traits<_InputIter>::iterator_category
|
||||
_IterCategory;
|
||||
|
@ -1403,7 +1405,8 @@ protected:
|
|||
// called by the range insert to implement [23.1.1]/9
|
||||
template<typename _Integer>
|
||||
void
|
||||
_M_insert_dispatch(iterator __pos, _Integer __n, _Integer __x, __true_type)
|
||||
_M_insert_dispatch(iterator __pos,
|
||||
_Integer __n, _Integer __x, __true_type)
|
||||
{
|
||||
_M_fill_insert(__pos, static_cast<size_type>(__n),
|
||||
static_cast<value_type>(__x));
|
||||
|
@ -1461,7 +1464,8 @@ protected:
|
|||
|
||||
/** @{
|
||||
* @if maint
|
||||
* @brief Memory-handling helpers for the previous internal insert functions.
|
||||
* @brief Memory-handling helpers for the previous internal insert
|
||||
* functions.
|
||||
* @endif
|
||||
*/
|
||||
iterator
|
||||
|
@ -1590,8 +1594,6 @@ inline void swap(deque<_Tp,_Alloc>& __x, deque<_Tp,_Alloc>& __y)
|
|||
{
|
||||
__x.swap(__y);
|
||||
}
|
||||
|
||||
} // namespace std
|
||||
|
||||
#endif /* __GLIBCPP_INTERNAL_DEQUE_H */
|
||||
|
||||
|
|
|
@ -67,14 +67,12 @@
|
|||
#pragma GCC system_header
|
||||
#include <bits/concept_check.h>
|
||||
|
||||
// Since this entire file is within namespace std, there's no reason to
|
||||
// waste two spaces along the left column. Thus the leading indentation is
|
||||
// slightly violated from here on.
|
||||
namespace std
|
||||
{
|
||||
template<typename _InputIterator>
|
||||
inline typename iterator_traits<_InputIterator>::difference_type
|
||||
__distance(_InputIterator __first, _InputIterator __last, input_iterator_tag)
|
||||
__distance(_InputIterator __first, _InputIterator __last,
|
||||
input_iterator_tag)
|
||||
{
|
||||
// concept requirements
|
||||
__glibcpp_function_requires(_InputIteratorConcept<_InputIterator>)
|
||||
|
@ -168,12 +166,6 @@ template<typename _InputIterator, typename _Distance>
|
|||
// concept requirements -- taken care of in __advance
|
||||
__advance(__i, __n, __iterator_category(__i));
|
||||
}
|
||||
|
||||
} // namespace std
|
||||
|
||||
#endif /* __GLIBCPP_INTERNAL_ITERATOR_BASE_FUNCS_H */
|
||||
|
||||
|
||||
// Local Variables:
|
||||
// mode:C++
|
||||
// End:
|
||||
|
|
|
@ -63,12 +63,8 @@
|
|||
|
||||
#include <bits/concept_check.h>
|
||||
|
||||
// Since this entire file is within namespace std, there's no reason to
|
||||
// waste two spaces along the left column. Thus the leading indentation is
|
||||
// slightly violated from here on.
|
||||
namespace std
|
||||
{
|
||||
|
||||
// Supporting structures are split into common and templated types; the
|
||||
// latter publicly inherits from the former in an effort to reduce code
|
||||
// duplication. This results in some "needless" static_cast'ing later on,
|
||||
|
@ -136,8 +132,8 @@ struct _List_iterator_base
|
|||
/**
|
||||
* @brief A list::iterator.
|
||||
*
|
||||
* In addition to being used externally, a list holds one of these internally,
|
||||
* pointing to the sequence of data.
|
||||
* In addition to being used externally, a list holds one of these
|
||||
* internally, pointing to the sequence of data.
|
||||
*
|
||||
* @if maint
|
||||
* All the functions are op overloads.
|
||||
|
@ -349,7 +345,7 @@ public:
|
|||
* @if maint
|
||||
* A couple points on memory allocation for list<Tp>:
|
||||
*
|
||||
* First, we never actually allocate a Tp, we actally allocate List_node<Tp>'s
|
||||
* First, we never actually allocate a Tp, we allocate List_node<Tp>'s
|
||||
* and trust [20.1.5]/4 to DTRT. This is to ensure that after elements from
|
||||
* %list<X,Alloc1> are spliced into %list<X,Alloc2>, destroying the memory of
|
||||
* the second %list is a valid operation, i.e., Alloc1 giveth and Alloc2
|
||||
|
@ -520,8 +516,8 @@ public:
|
|||
* @brief %List assignment operator.
|
||||
* @param x A %list of identical element and allocator types.
|
||||
*
|
||||
* All the elements of @a x are copied, but unlike the copy constructor, the
|
||||
* allocator object is not copied.
|
||||
* All the elements of @a x are copied, but unlike the copy constructor,
|
||||
* the allocator object is not copied.
|
||||
*/
|
||||
list&
|
||||
operator=(const list& __x);
|
||||
|
@ -711,9 +707,9 @@ public:
|
|||
* @brief Add data to the front of the %list.
|
||||
*
|
||||
* This is a typical stack operation. The function creates a
|
||||
* default-constructed element at the front of the %list. Due to the nature
|
||||
* of a %list this operation can be done in constant time. You should
|
||||
* consider using push_front(value_type()) instead.
|
||||
* default-constructed element at the front of the %list. Due to the
|
||||
* nature of a %list this operation can be done in constant time. You
|
||||
* should consider using push_front(value_type()) instead.
|
||||
*
|
||||
* @note This was deprecated in 3.2 and will be removed in 3.4. You must
|
||||
* define @c _GLIBCPP_DEPRECATED to make this visible in 3.2; see
|
||||
|
@ -877,7 +873,8 @@ public:
|
|||
/**
|
||||
* @brief Remove a range of elements.
|
||||
* @param first Iterator pointing to the first element to be erased.
|
||||
* @param last Iterator pointing to one past the last element to be erased.
|
||||
* @param last Iterator pointing to one past the last element to be
|
||||
* erased.
|
||||
* @return An iterator pointing to the element pointed to by @a last
|
||||
* prior to erasing (or end()).
|
||||
*
|
||||
|
@ -1040,7 +1037,8 @@ protected:
|
|||
// called by the range insert to implement [23.1.1]/9
|
||||
template<typename _Integer>
|
||||
void
|
||||
_M_insert_dispatch(iterator __pos, _Integer __n, _Integer __x, __true_type)
|
||||
_M_insert_dispatch(iterator __pos, _Integer __n, _Integer __x,
|
||||
__true_type)
|
||||
{
|
||||
_M_fill_insert(__pos, static_cast<size_type>(__n),
|
||||
static_cast<value_type>(__x));
|
||||
|
@ -1162,8 +1160,6 @@ template<typename _Tp, typename _Alloc>
|
|||
inline void
|
||||
swap(list<_Tp, _Alloc>& __x, list<_Tp, _Alloc>& __y)
|
||||
{ __x.swap(__y); }
|
||||
|
||||
} // namespace std
|
||||
|
||||
#endif /* __GLIBCPP_INTERNAL_LIST_H */
|
||||
|
||||
|
|
|
@ -63,12 +63,8 @@
|
|||
|
||||
#include <bits/concept_check.h>
|
||||
|
||||
// Since this entire file is within namespace std, there's no reason to
|
||||
// waste two spaces along the left column. Thus the leading indentation is
|
||||
// slightly violated from here on.
|
||||
namespace std
|
||||
{
|
||||
|
||||
/**
|
||||
* @brief A standard container made up of (key,value) pairs, which can be
|
||||
* retrieved based on a key, in logarithmic time.
|
||||
|
@ -209,8 +205,8 @@ public:
|
|||
* @brief Map assignment operator.
|
||||
* @param x A %map of identical element and allocator types.
|
||||
*
|
||||
* All the elements of @a x are copied, but unlike the copy constructor, the
|
||||
* allocator object is not copied.
|
||||
* All the elements of @a x are copied, but unlike the copy constructor,
|
||||
* the allocator object is not copied.
|
||||
*/
|
||||
map&
|
||||
operator=(const map& __x)
|
||||
|
@ -233,7 +229,8 @@ public:
|
|||
|
||||
/**
|
||||
* Returns a read-only (constant) iterator that points to the first pair
|
||||
* in the %map. Iteration is done in ascending order according to the keys.
|
||||
* in the %map. Iteration is done in ascending order according to the
|
||||
* keys.
|
||||
*/
|
||||
const_iterator
|
||||
begin() const { return _M_t.begin(); }
|
||||
|
@ -278,8 +275,8 @@ public:
|
|||
|
||||
/**
|
||||
* Returns a read-only (constant) reverse iterator that points to one
|
||||
* before the first pair in the %map. Iteration is done in descending order
|
||||
* according to the keys.
|
||||
* before the first pair in the %map. Iteration is done in descending
|
||||
* order according to the keys.
|
||||
*/
|
||||
const_reverse_iterator
|
||||
rend() const { return _M_t.rend(); }
|
||||
|
@ -332,9 +329,9 @@ public:
|
|||
* to the possibly inserted pair, and the second is a bool that
|
||||
* is true if the pair was actually inserted.
|
||||
*
|
||||
* This function attempts to insert a (key, value) %pair into the %map. A
|
||||
* %map relies on unique keys and thus a %pair is only inserted if its first
|
||||
* element (the key) is not already present in the %map.
|
||||
* This function attempts to insert a (key, value) %pair into the %map.
|
||||
* A %map relies on unique keys and thus a %pair is only inserted if its
|
||||
* first element (the key) is not already present in the %map.
|
||||
*
|
||||
* Insertion requires logarithmic time.
|
||||
*/
|
||||
|
@ -368,7 +365,8 @@ public:
|
|||
|
||||
/**
|
||||
* @brief A template function that attemps to insert a range of elements.
|
||||
* @param first Iterator pointing to the start of the range to be inserted.
|
||||
* @param first Iterator pointing to the start of the range to be
|
||||
* inserted.
|
||||
* @param last Iterator pointing to the end of the range.
|
||||
*
|
||||
* Complexity similar to that of the range constructor.
|
||||
|
@ -658,8 +656,6 @@ template <typename _Key, typename _Tp, typename _Compare, typename _Alloc>
|
|||
inline void
|
||||
swap(map<_Key,_Tp,_Compare,_Alloc>& __x, map<_Key,_Tp,_Compare,_Alloc>& __y)
|
||||
{ __x.swap(__y); }
|
||||
|
||||
} // namespace std
|
||||
|
||||
#endif /* __GLIBCPP_INTERNAL_MAP_H */
|
||||
|
||||
|
|
|
@ -63,12 +63,8 @@
|
|||
|
||||
#include <bits/concept_check.h>
|
||||
|
||||
// Since this entire file is within namespace std, there's no reason to
|
||||
// waste two spaces along the left column. Thus the leading indentation is
|
||||
// slightly violated from here on.
|
||||
namespace std
|
||||
{
|
||||
|
||||
// Forward declaration of operators < and ==, needed for friend declaration.
|
||||
|
||||
template <typename _Key, typename _Tp,
|
||||
|
@ -93,9 +89,9 @@ inline bool operator<(const multimap<_Key,_Tp,_Compare,_Alloc>& __x,
|
|||
*
|
||||
* Meets the requirements of a <a href="tables.html#65">container</a>, a
|
||||
* <a href="tables.html#66">reversible container</a>, and an
|
||||
* <a href="tables.html#69">associative container</a> (using equivalent keys).
|
||||
* For a @c multimap<Key,T> the key_type is Key, the mapped_type is T, and
|
||||
* the value_type is std::pair<const Key,T>.
|
||||
* <a href="tables.html#69">associative container</a> (using equivalent
|
||||
* keys). For a @c multimap<Key,T> the key_type is Key, the mapped_type
|
||||
* is T, and the value_type is std::pair<const Key,T>.
|
||||
*
|
||||
* Multimaps support bidirectional iterators.
|
||||
*
|
||||
|
@ -199,9 +195,9 @@ public:
|
|||
* @param comp A comparison functor.
|
||||
* @param a An allocator object.
|
||||
*
|
||||
* Create a %multimap consisting of copies of the elements from [first,last).
|
||||
* This is linear in N if the range is already sorted, and NlogN
|
||||
* otherwise (where N is distance(first,last)).
|
||||
* Create a %multimap consisting of copies of the elements from
|
||||
* [first,last). This is linear in N if the range is already sorted,
|
||||
* and NlogN otherwise (where N is distance(first,last)).
|
||||
*/
|
||||
template <typename _InputIterator>
|
||||
multimap(_InputIterator __first, _InputIterator __last,
|
||||
|
@ -223,8 +219,8 @@ public:
|
|||
* @brief %Multimap assignment operator.
|
||||
* @param x A %multimap of identical element and allocator types.
|
||||
*
|
||||
* All the elements of @a x are copied, but unlike the copy constructor, the
|
||||
* allocator object is not copied.
|
||||
* All the elements of @a x are copied, but unlike the copy constructor,
|
||||
* the allocator object is not copied.
|
||||
*/
|
||||
multimap&
|
||||
operator=(const multimap& __x)
|
||||
|
@ -355,7 +351,8 @@ public:
|
|||
|
||||
/**
|
||||
* @brief A template function that attemps to insert a range of elements.
|
||||
* @param first Iterator pointing to the start of the range to be inserted.
|
||||
* @param first Iterator pointing to the start of the range to be
|
||||
* inserted.
|
||||
* @param last Iterator pointing to the end of the range.
|
||||
*
|
||||
* Complexity similar to that of the range constructor.
|
||||
|
@ -634,8 +631,6 @@ template <typename _Key, typename _Tp, typename _Compare, typename _Alloc>
|
|||
swap(multimap<_Key,_Tp,_Compare,_Alloc>& __x,
|
||||
multimap<_Key,_Tp,_Compare,_Alloc>& __y)
|
||||
{ __x.swap(__y); }
|
||||
|
||||
} // namespace std
|
||||
|
||||
#endif /* __GLIBCPP_INTERNAL_MULTIMAP_H */
|
||||
|
||||
|
|
|
@ -63,12 +63,8 @@
|
|||
|
||||
#include <bits/concept_check.h>
|
||||
|
||||
// Since this entire file is within namespace std, there's no reason to
|
||||
// waste two spaces along the left column. Thus the leading indentation is
|
||||
// slightly violated from here on.
|
||||
namespace std
|
||||
{
|
||||
|
||||
// Forward declarations of operators < and ==, needed for friend declaration.
|
||||
|
||||
template <typename _Tp, typename _Sequence = deque<_Tp> >
|
||||
|
@ -87,7 +83,8 @@ inline bool operator<(const queue<_Tp,_Seq>&, const queue<_Tp,_Seq>&);
|
|||
* @ingroup Containers
|
||||
* @ingroup Sequences
|
||||
*
|
||||
* Meets many of the requirements of a <a href="tables.html#65">container</a>,
|
||||
* Meets many of the requirements of a
|
||||
* <a href="tables.html#65">container</a>,
|
||||
* but does not define anything to do with iterators. Very few of the
|
||||
* other standard container interfaces are defined.
|
||||
*
|
||||
|
@ -233,9 +230,9 @@ template <typename _Tp, typename _Sequence>
|
|||
* @param y A %queue of the same type as @a x.
|
||||
* @return True iff @a x is lexographically less than @a y.
|
||||
*
|
||||
* This is an total ordering relation. Complexity and semantics depend on the
|
||||
* underlying sequence type, but the expected rules are: this relation is
|
||||
* linear in the size of the sequences, the elements must be comparable
|
||||
* This is an total ordering relation. Complexity and semantics depend on
|
||||
* the underlying sequence type, but the expected rules are: this relation
|
||||
* is linear in the size of the sequences, the elements must be comparable
|
||||
* with @c <, and std::lexographical_compare() is usually used to make the
|
||||
* determination.
|
||||
*/
|
||||
|
@ -428,8 +425,6 @@ public:
|
|||
};
|
||||
|
||||
// No equality/comparison operators are provided for priority_queue.
|
||||
|
||||
} // namespace std
|
||||
|
||||
#endif /* __GLIBCPP_INTERNAL_QUEUE_H */
|
||||
|
||||
|
|
|
@ -63,19 +63,16 @@
|
|||
|
||||
#include <bits/concept_check.h>
|
||||
|
||||
// Since this entire file is within namespace std, there's no reason to
|
||||
// waste two spaces along the left column. Thus the leading indentation is
|
||||
// slightly violated from here on.
|
||||
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);
|
||||
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);
|
||||
|
@ -87,7 +84,8 @@ inline bool operator<(const stack<_Tp,_Seq>& __x, const stack<_Tp,_Seq>& __y);
|
|||
* @ingroup Containers
|
||||
* @ingroup Sequences
|
||||
*
|
||||
* Meets many of the requirements of a <a href="tables.html#65">container</a>,
|
||||
* Meets many of the requirements of a
|
||||
* <a href="tables.html#65">container</a>,
|
||||
* but does not define anything to do with iterators. Very few of the
|
||||
* other standard container interfaces are defined.
|
||||
*
|
||||
|
@ -213,9 +211,9 @@ template <typename _Tp, typename _Seq>
|
|||
* @param y A %stack of the same type as @a x.
|
||||
* @return True iff @a x is lexographically less than @a y.
|
||||
*
|
||||
* This is an total ordering relation. Complexity and semantics depend on the
|
||||
* underlying sequence type, but the expected rules are: this relation is
|
||||
* linear in the size of the sequences, the elements must be comparable
|
||||
* This is an total ordering relation. Complexity and semantics depend on
|
||||
* the underlying sequence type, but the expected rules are: this relation
|
||||
* is linear in the size of the sequences, the elements must be comparable
|
||||
* with @c <, and std::lexographical_compare() is usually used to make the
|
||||
* determination.
|
||||
*/
|
||||
|
@ -247,8 +245,6 @@ template <typename _Tp, typename _Seq>
|
|||
inline bool
|
||||
operator>=(const stack<_Tp,_Seq>& __x, const stack<_Tp,_Seq>& __y)
|
||||
{ return !(__x < __y); }
|
||||
|
||||
} // namespace std
|
||||
|
||||
#endif /* __GLIBCPP_INTERNAL_STACK_H */
|
||||
|
||||
|
|
|
@ -65,12 +65,8 @@
|
|||
#include <bits/functexcept.h>
|
||||
#include <bits/concept_check.h>
|
||||
|
||||
// Since this entire file is within namespace std, there's no reason to
|
||||
// waste two spaces along the left column. Thus the leading indentation is
|
||||
// slightly violated from here on.
|
||||
namespace std
|
||||
{
|
||||
|
||||
/// @if maint Primary default version. @endif
|
||||
/**
|
||||
* @if maint
|
||||
|
@ -695,7 +691,8 @@ public:
|
|||
/**
|
||||
* @brief Remove a range of elements.
|
||||
* @param first Iterator pointing to the first element to be erased.
|
||||
* @param last Iterator pointing to one past the last element to be erased.
|
||||
* @param last Iterator pointing to one past the last element to be
|
||||
* erased.
|
||||
* @return An iterator pointing to the element pointed to by @a last
|
||||
* prior to erasing (or end()).
|
||||
*
|
||||
|
@ -778,7 +775,8 @@ protected:
|
|||
// called by the range constructor to implement [23.1.1]/9
|
||||
template<typename _InputIter>
|
||||
void
|
||||
_M_initialize_dispatch(_InputIter __first, _InputIter __last, __false_type)
|
||||
_M_initialize_dispatch(_InputIter __first, _InputIter __last,
|
||||
__false_type)
|
||||
{
|
||||
typedef typename iterator_traits<_InputIter>::iterator_category
|
||||
_IterCategory;
|
||||
|
@ -966,7 +964,6 @@ template <typename _Tp, typename _Alloc>
|
|||
inline void
|
||||
swap(vector<_Tp,_Alloc>& __x, vector<_Tp,_Alloc>& __y)
|
||||
{ __x.swap(__y); }
|
||||
|
||||
} // namespace std
|
||||
|
||||
#endif /* __GLIBCPP_INTERNAL_VECTOR_H */
|
||||
|
|
|
@ -61,12 +61,8 @@
|
|||
#ifndef __GLIBCPP_INTERNAL_VECTOR_TCC
|
||||
#define __GLIBCPP_INTERNAL_VECTOR_TCC
|
||||
|
||||
// Since this entire file is within namespace std, there's no reason to
|
||||
// waste two spaces along the left column. Thus the leading indentation is
|
||||
// slightly violated from here on.
|
||||
namespace std
|
||||
{
|
||||
|
||||
template <typename _Tp, typename _Alloc>
|
||||
void
|
||||
vector<_Tp,_Alloc>::
|
||||
|
@ -190,7 +186,8 @@ template <typename _Tp, typename _Alloc> template <typename _InputIter>
|
|||
template <typename _Tp, typename _Alloc> template <typename _ForwardIter>
|
||||
void
|
||||
vector<_Tp,_Alloc>::
|
||||
_M_assign_aux(_ForwardIter __first, _ForwardIter __last, forward_iterator_tag)
|
||||
_M_assign_aux(_ForwardIter __first, _ForwardIter __last,
|
||||
forward_iterator_tag)
|
||||
{
|
||||
size_type __len = distance(__first, __last);
|
||||
|
||||
|
@ -338,7 +335,8 @@ template <typename _Tp, typename _Alloc>
|
|||
iterator __new_finish(__new_start);
|
||||
try
|
||||
{
|
||||
__new_finish = uninitialized_copy(begin(), __position, __new_start);
|
||||
__new_finish = uninitialized_copy(begin(), __position,
|
||||
__new_start);
|
||||
__new_finish = uninitialized_fill_n(__new_finish, __n, __x);
|
||||
__new_finish
|
||||
= uninitialized_copy(__position, end(), __new_finish);
|
||||
|
@ -432,8 +430,6 @@ template <typename _Tp, typename _Alloc> template <typename _ForwardIterator>
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace std
|
||||
|
||||
#endif /* __GLIBCPP_INTERNAL_VECTOR_TCC */
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue