BUGS: Update from 2.90.8 snapshot.

2003-06-10  Phil Edwards  <pme@gcc.gnu.org>

	* docs/html/17_intro/BUGS:  Update from 2.90.8 snapshot.
	* docs/html/17_intro/CHECKLIST:  Bring up to date with respect to
	correctness of container::iterator typedefs.  Fix whitespace.
	* docs/html/20_util/howto.html, docs/html/ext/howto.html:  Add links
	to allocator docs.
	* docs/html/documentation.html:  Regenerate.

	* include/bits/basic_string.h, include/bits/basic_string.tcc,
	include/bits/deque.tcc, include/bits/list.tcc, include/bits/stl_algo.h,
	include/bits/stl_algobase.h, include/bits/stl_bvector.h,
	include/bits/stl_deque.h, include/bits/stl_iterator_base_funcs.h,
	include/bits/stl_list.h, include/bits/stl_uninitialized.h,
	include/bits/stl_vector.h, include/bits/vector.tcc,
	include/ext/algorithm, include/ext/slist, include/std/std_bitset.h:
	Change _Iter names to _Iterator, and __pos to __position.

	* include/bits/stl_relops.h, include/bits/stl_numeric.h,
	include/bits/stl_multiset.h, include/bits/stl_set.h:
	Remove emacs markers.

	* include/bits/stl_threads.h (_STL_auto_lock):  Add __unused__.

From-SVN: r67736
This commit is contained in:
Phil Edwards 2003-06-10 21:52:25 +00:00
parent e8face4c59
commit 08addde65f
27 changed files with 1317 additions and 1310 deletions

View File

@ -1,3 +1,27 @@
2003-06-10 Phil Edwards <pme@gcc.gnu.org>
* docs/html/17_intro/BUGS: Update from 2.90.8 snapshot.
* docs/html/17_intro/CHECKLIST: Bring up to date with respect to
correctness of container::iterator typedefs. Fix whitespace.
* docs/html/20_util/howto.html, docs/html/ext/howto.html: Add links
to allocator docs.
* docs/html/documentation.html: Regenerate.
* include/bits/basic_string.h, include/bits/basic_string.tcc,
include/bits/deque.tcc, include/bits/list.tcc, include/bits/stl_algo.h,
include/bits/stl_algobase.h, include/bits/stl_bvector.h,
include/bits/stl_deque.h, include/bits/stl_iterator_base_funcs.h,
include/bits/stl_list.h, include/bits/stl_uninitialized.h,
include/bits/stl_vector.h, include/bits/vector.tcc,
include/ext/algorithm, include/ext/slist, include/std/std_bitset.h:
Change _Iter names to _Iterator, and __pos to __position.
* include/bits/stl_relops.h, include/bits/stl_numeric.h,
include/bits/stl_multiset.h, include/bits/stl_set.h:
Remove emacs markers.
* include/bits/stl_threads.h (_STL_auto_lock): Add __unused__.
2003-06-10 Paolo Carlini <pcarlini@unitus.it>
* include/bits/fstream.tcc (overflow): According to

View File

@ -1,7 +1,4 @@
2000-03-24 libstdc++2.90.8
- testsuite/27_io/istream_extractors_char.cc:
Failing on all platforms with -O2, working with -O. Need to look at this.
2003-04-26
- _GLIBCPP_HAS_BUILTIN_SINF: We should still hold out for a cleaner solution the is currenly the case in bits/std_cmath.h.

View File

@ -1,6 +1,6 @@
Completion Checklist for the Standard C++ Library
Updated: 1999-05-18
Updated: 2003-04-25
Status Code Legend:
M - Missing
@ -17,10 +17,8 @@
issues appear [in brackets].
Note that this checklist does not (yet) include all emendations
recommended by the ISO Library Working Group: (restricted site)
http://www.cygnus.com/iso/wp/html/fdis/lwg-issues.html
The LWG has announced its intention to release a public version
of the issues list, URL to be added here. XXX
recommended by the ISO Library Working Group:
http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/lwg-toc.html
Detailed explanation of status codes:
@ -36,7 +34,7 @@
It may have an incorrect base class, wrong namespace, wrong
storage class, or simply not fully implement requirements.
However, it may be sufficiently usable to help test other
components.
components.
T - Implemented, pending test/inspection: Implementation believed
to be complete, and informal testing suggests it is ready for
@ -49,14 +47,14 @@
Inspected, "implementation-defined" documentation accepted,
local usability criteria satisfied, formally inspected for
other untestable conformance. (Untestable requirements
include exception-safety, thread-safety, worst-case
complexity, memory cleanliness, usefulness.)
include exception-safety, thread-safety, worst-case
complexity, memory cleanliness, usefulness.)
P - Portability verified: Qualified on all primary target platforms.
C - Certified: Formally certified to have passed all tests,
inspections, qualifications; approved under "signing authority"
to be used to satisfy contractual guarantees.
to be used to satisfy contractual guarantees.
----------------------------------------------------------------------
<algorithm> <iomanip> <list> <ostream> <streambuf>
@ -89,11 +87,11 @@ X wctrans_t, wctype_t, and wint_t.
subroutines is implementation-defined.
18.1 Types [lib.support.types]
X <cstddef>
X NULL
X offsetof
X ptrdiff_t
X size_t
X <cstddef>
X NULL
X offsetof
X ptrdiff_t
X size_t
18.2 Implementation properties [lib.support.limits]
@ -101,9 +99,6 @@ X size_t
18.2.1 Numeric limits [lib.limits]
[Note: the numeric_limits templates are now automatically
generated. ]
X template<class T> class numeric_limits;
T enum float_round_style;
@ -192,7 +187,7 @@ T denorm present = 1;
1 Header <climits> (Table 3):
CHAR_BIT INT_MAX LONG_MIN SCHAR_MIN UCHAR_MAX USHRT_MAX
X CHAR_MAX INT_MIN MB_LEN_MAX SHRT_MAX UINT_MAX
X CHAR_MAX INT_MIN MB_LEN_MAX SHRT_MAX UINT_MAX
CHAR_MIN LONG_MAX SCHAR_MAX SHRT_MIN ULONG_MAX
3 Header <cfloat> (Table 4):
@ -457,7 +452,7 @@ X |Macros: EDOM ERANGE errno |
Header <utility> synopsis
// _lib.operators_, operators:
X namespace rel_ops {
T namespace rel_ops {
T template<class T> bool operator!=(const T&, const T&);
T template<class T> bool operator> (const T&, const T&);
T template<class T> bool operator<=(const T&, const T&);
@ -2280,7 +2275,7 @@ X Functions: localeconv setlocale
Header <deque> synopsis
X template <class T, class Allocator = allocator<T> > class deque;
T template <class T, class Allocator = allocator<T> > class deque;
T template <class T, class Allocator>
bool operator==(const deque<T,Allocator>& x, const deque<T,Allocator>& y);
T template <class T, class Allocator>
@ -2299,7 +2294,7 @@ T template <class T, class Allocator>
Header <list> synopsis
X template <class T, class Allocator = allocator<T> > class list;
T template <class T, class Allocator = allocator<T> > class list;
T template <class T, class Allocator>
bool operator==(const list<T,Allocator>& x, const list<T,Allocator>& y);
T template <class T, class Allocator>
@ -2319,7 +2314,7 @@ T template <class T, class Allocator>
Header <queue> synopsis
namespace std {
X template <class T, class Container = deque<T> > class queue;
T template <class T, class Container = deque<T> > class queue;
T template <class T, class Container>
bool operator==(const queue<T, Container>& x,
const queue<T, Container>& y);
@ -2418,13 +2413,13 @@ T template <class Allocator>
23.2.1 Template class deque [lib.deque]
template <class T, class Allocator = allocator<T> >
X class deque {
T class deque {
public:
// types:
T typedef typename Allocator::reference reference;
T typedef typename Allocator::const_reference const_reference;
X typedef implementation defined iterator;
X typedef implementation defined const_iterator;
T typedef implementation defined iterator;
T typedef implementation defined const_iterator;
T typedef implementation defined size_type;
T typedef implementation defined difference_type;
T typedef T value_type;
@ -2511,14 +2506,14 @@ T template <class T, class Allocator>
23.2.2 Template class list [lib.list]
X template <class T, class Allocator = allocator<T> >
T template <class T, class Allocator = allocator<T> >
class list {
public:
// types:
T typedef typename Allocator::reference reference;
T typedef typename Allocator::const_reference const_reference;
X typedef implementation defined iterator;
X typedef implementation defined const_iterator;
T typedef implementation defined iterator;
T typedef implementation defined const_iterator;
T typedef implementation defined size_type;
T typedef implementation defined difference_type;
T typedef T value_type;
@ -2720,13 +2715,13 @@ T template <class T, class Container>
23.2.4 Template class vector [lib.vector]
template <class T, class Allocator = allocator<T> >
X class vector {
T class vector {
public:
// types:
T typedef typename Allocator::reference reference;
T typedef typename Allocator::const_reference const_reference;
X typedef implementation defined iterator;
X typedef implementation defined const_iterator;
T typedef implementation defined iterator;
T typedef implementation defined const_iterator;
T typedef implementation defined size_type;
T typedef implementation defined difference_type;
T typedef T value_type;
@ -2814,12 +2809,12 @@ T template <class T, class Allocator>
23.2.5 Class vector<bool> [lib.vector.bool]
X template <class Allocator> class vector<bool, Allocator> {
T template <class Allocator> class vector<bool, Allocator> {
public:
// types:
T typedef bool const_reference;
X typedef implementation defined iterator;
X typedef implementation defined const_iterator;
T typedef implementation defined iterator;
T typedef implementation defined const_iterator;
T typedef implementation defined size_type;
T typedef implementation defined difference_type;
T typedef bool value_type;
@ -2925,7 +2920,7 @@ T template <class Allocator>
template <class Key, class T, class Compare = less<Key>,
class Allocator = allocator<pair<const Key, T> > >
X class map;
T class map;
T template <class Key, class T, class Compare, class Allocator>
bool operator==(const map<Key,T,Compare,Allocator>& x,
@ -2978,7 +2973,7 @@ T template <class Key, class T, class Compare, class Allocator>
template <class Key, class Compare = less<Key>,
class Allocator = allocator<Key> >
X class set;
T class set;
T template <class Key, class Compare, class Allocator>
bool operator==(const set<Key,Compare,Allocator>& x,
@ -3031,7 +3026,7 @@ T template <class Key, class Compare, class Allocator>
template <class Key, class T, class Compare = less<Key>,
class Allocator = allocator<pair<const Key, T> > >
X class map {
T class map {
public:
// types:
T typedef Key key_type;
@ -3041,8 +3036,8 @@ T typedef Compare key_compare;
T typedef Allocator allocator_type;
T typedef typename Allocator::reference reference;
T typedef typename Allocator::const_reference const_reference;
X typedef implementation defined iterator;
X typedef implementation defined const_iterator;
T typedef implementation defined iterator;
T typedef implementation defined const_iterator;
T typedef implementation defined size_type;
T typedef implementation defined difference_type;
T typedef typename Allocator::pointer pointer;
@ -3140,7 +3135,7 @@ T template <class Key, class T, class Compare, class Allocator>
template <class Key, class T, class Compare = less<Key>,
class Allocator = allocator<pair<const Key, T> > >
X class multimap {
T class multimap {
public:
// types:
T typedef Key key_type;
@ -3150,8 +3145,8 @@ T typedef Compare key_compare;
T typedef Allocator allocator_type;
T typedef typename Allocator::reference reference;
T typedef typename Allocator::const_reference const_reference;
X typedef implementation defined iterator;
X typedef implementation defined const_iterator;
T typedef implementation defined iterator;
T typedef implementation defined const_iterator;
T typedef implementation defined size_type;
T typedef implementation defined difference_type
T typedef typename Allocator::pointer pointer;
@ -3248,7 +3243,7 @@ T template <class Key, class T, class Compare, class Allocator>
template <class Key, class Compare = less<Key>,
class Allocator = allocator<Key> >
X class set {
T class set {
public:
// types:
T typedef Key key_type;
@ -3258,8 +3253,8 @@ T typedef Compare value_compare;
T typedef Allocator allocator_type;
T typedef typename Allocator::reference reference;
T typedef typename Allocator::const_reference const_reference;
X typedef implementation defined iterator;
X typedef implementation defined const_iterator;
T typedef implementation defined iterator;
T typedef implementation defined const_iterator;
T typedef implementation defined size_type;
T typedef implementation defined difference_type;
T typedef typename Allocator::pointer pointer;
@ -3338,7 +3333,7 @@ T template <class Key, class Compare, class Allocator>
template <class Key, class Compare = less<Key>,
class Allocator = allocator<Key> >
X class multiset {
T class multiset {
public:
// types:
T typedef Key key_type;
@ -3348,8 +3343,8 @@ T typedef Compare value_compare;
T typedef Allocator allocator_type;
T typedef typename Allocator::reference reference;
T typedef typename Allocator::const_reference const_reference;
X typedef implementation defined iterator;
X typedef implementation defined const_iterator;
T typedef implementation defined iterator;
T typedef implementation defined const_iterator;
T typedef implementation defined size_type;
T typedef implementation defined difference_type
T typedef typename Allocator::pointer pointer;
@ -3430,14 +3425,7 @@ T template <class Key, class Compare, class Allocator>
Header <bitset> synopsis
[What's this stuff?
#include <cstddef> // for size_t
#include <string>
#include <stdexcept> // for invalid_argument,
// out_of_range, overflow_error
#include <iosfwd> // for istream, ostream
]
X template <size_t N> class bitset;
T template <size_t N> class bitset;
// _lib.bitset.operators_ bitset operations:
T template <size_t N>
bitset<N> operator&(const bitset<N>&, const bitset<N>&);
@ -3452,7 +3440,7 @@ T template <class charT, class traits, size_t N>
basic_ostream<charT, traits>&
operator<<(basic_ostream<charT, traits>& os, const bitset<N>& x);
X template<size_t N> class bitset {
T template<size_t N> class bitset {
public:
// bit reference:
T class reference {

View File

@ -30,6 +30,7 @@
<li><a href="#2"><code>auto_ptr</code> inside container classes</a></li>
<li><a href="#3">Functors</a></li>
<li><a href="#4">Pairs</a></li>
<li><a href="#5">Memory allocators</a></li>
</ul>
<hr />
@ -207,7 +208,14 @@
<a href="../faq/index.html">to the FAQ</a>.
</p>
<hr />
<h2><a name="5">Memory allocators</a></h2>
<p>The available free store (&quot;heap&quot;) management classes are
described <a href="../ext/howto.html">here</a>.
</p>
<p>Return <a href="#top">to top of page</a> or
<a href="../faq/index.html">to the FAQ</a>.
</p>
<!-- ####################################################### -->

View File

@ -143,6 +143,7 @@
<li><a href="20_util/howto.html#2"><code>auto_ptr</code> inside container classes</a></li>
<li><a href="20_util/howto.html#3">Functors</a></li>
<li><a href="20_util/howto.html#4">Pairs</a></li>
<li><a href="20_util/howto.html#5">Memory allocators</a></li>
</ul>
</li>
@ -222,8 +223,8 @@
<ul>
<li><a href="ext/howto.html#1">Ropes and trees and hashes, oh my!</a></li>
<li><a href="ext/howto.html#2">Added members and types</a></li>
<li><a href="ext/howto.html#3">Allocators (versions 3.0, 3.1, 3.2)</a></li>
<li><a href="ext/howto.html#6">Allocators (version 3.3)</a></li>
<li><a href="ext/howto.html#3">Allocators (versions 3.0, 3.1, 3.2, 3.3)</a></li>
<li><a href="ext/howto.html#6">Allocators (version 3.4)</a></li>
<li><a href="ext/howto.html#4">Compile-time checks</a></li>
<li><a href="ext/howto.html#5">LWG Issues</a></li>
<li><a href="ext/../18_support/howto.html#5">Demangling</a></li>

View File

@ -41,8 +41,8 @@
<ul>
<li><a href="#1">Ropes and trees and hashes, oh my!</a></li>
<li><a href="#2">Added members and types</a></li>
<li><a href="#3">Allocators (versions 3.0, 3.1, 3.2)</a></li>
<li><a href="#6">Allocators (version 3.3)</a></li>
<li><a href="#3">Allocators (versions 3.0, 3.1, 3.2, 3.3)</a></li>
<li><a href="#6">Allocators (version 3.4)</a></li>
<li><a href="#4">Compile-time checks</a></li>
<li><a href="#5">LWG Issues</a></li>
<li><a href="../18_support/howto.html#5">Demangling</a></li>
@ -134,7 +134,7 @@
</p>
<hr />
<h2><a name="3">Allocators (versions 3.0, 3.1, 3.2)</a></h2>
<h2><a name="3">Allocators (versions 3.0, 3.1, 3.2, 3.3)</a></h2>
<p>Thread-safety, space efficiency, high speed, portability... this is a
mess. Where to begin?
</p>
@ -361,9 +361,14 @@
</p>
<hr />
<h2><a name="6">Allocators (version 3.3)</a></h2>
<h2><a name="6">Allocators (version 3.4)</a></h2>
<p>Changes are coming...
</p>
<p>If you plan on writing your own allocators,
<a href="../documentation.html#4">source documentation</a> is
available. You'll need to get the &quot;maintainers&quot; collection
in order to see the helper classes and extra notes.
</p>
<p>Return <a href="#top">to top of page</a> or
<a href="../faq/index.html">to the FAQ</a>.
</p>

View File

@ -661,43 +661,43 @@ namespace std
// _S_construct_aux is used to implement the 21.3.1 para 15 which
// requires special behaviour if _InIter is an integral type
template<class _InIter>
template<class _InIterator>
static _CharT*
_S_construct_aux(_InIter __beg, _InIter __end, const _Alloc& __a,
_S_construct_aux(_InIterator __beg, _InIterator __end, const _Alloc& __a,
__false_type)
{
typedef typename iterator_traits<_InIter>::iterator_category _Tag;
typedef typename iterator_traits<_InIterator>::iterator_category _Tag;
return _S_construct(__beg, __end, __a, _Tag());
}
template<class _InIter>
template<class _InIterator>
static _CharT*
_S_construct_aux(_InIter __beg, _InIter __end, const _Alloc& __a,
_S_construct_aux(_InIterator __beg, _InIterator __end, const _Alloc& __a,
__true_type)
{
return _S_construct(static_cast<size_type>(__beg),
static_cast<value_type>(__end), __a);
}
template<class _InIter>
template<class _InIterator>
static _CharT*
_S_construct(_InIter __beg, _InIter __end, const _Alloc& __a)
_S_construct(_InIterator __beg, _InIterator __end, const _Alloc& __a)
{
typedef typename _Is_integer<_InIter>::_Integral _Integral;
typedef typename _Is_integer<_InIterator>::_Integral _Integral;
return _S_construct_aux(__beg, __end, __a, _Integral());
}
// For Input Iterators, used in istreambuf_iterators, etc.
template<class _InIter>
template<class _InIterator>
static _CharT*
_S_construct(_InIter __beg, _InIter __end, const _Alloc& __a,
_S_construct(_InIterator __beg, _InIterator __end, const _Alloc& __a,
input_iterator_tag);
// For forward_iterators up to random_access_iterators, used for
// string::iterator, _CharT*, etc.
template<class _FwdIter>
template<class _FwdIterator>
static _CharT*
_S_construct(_FwdIter __beg, _FwdIter __end, const _Alloc& __a,
_S_construct(_FwdIterator __beg, _FwdIterator __end, const _Alloc& __a,
forward_iterator_tag);
static _CharT*

View File

@ -71,10 +71,10 @@ namespace std
// Input Iterators have a cost structure very different from
// pointers, calling for a different coding style.
template<typename _CharT, typename _Traits, typename _Alloc>
template<typename _InIter>
template<typename _InIterator>
_CharT*
basic_string<_CharT, _Traits, _Alloc>::
_S_construct(_InIter __beg, _InIter __end, const _Alloc& __a,
_S_construct(_InIterator __beg, _InIterator __end, const _Alloc& __a,
input_iterator_tag)
{
if (__beg == __end && __a == _Alloc())
@ -131,17 +131,17 @@ namespace std
}
template<typename _CharT, typename _Traits, typename _Alloc>
template <class _InIter>
template <class _InIterator>
_CharT*
basic_string<_CharT, _Traits, _Alloc>::
_S_construct(_InIter __beg, _InIter __end, const _Alloc& __a,
_S_construct(_InIterator __beg, _InIterator __end, const _Alloc& __a,
forward_iterator_tag)
{
if (__beg == __end && __a == _Alloc())
return _S_empty_rep()._M_refcopy();
// NB: Not required, but considered best practice.
if (__builtin_expect(__beg == _InIter(), 0))
if (__builtin_expect(__beg == _InIterator(), 0))
__throw_logic_error("basic_string::_S_construct NULL not valid");
const size_type __dnew = static_cast<size_type>(std::distance(__beg, __end));
@ -234,9 +234,9 @@ namespace std
{ }
template<typename _CharT, typename _Traits, typename _Alloc>
template<typename _InputIter>
template<typename _InputIterator>
basic_string<_CharT, _Traits, _Alloc>::
basic_string(_InputIter __beg, _InputIter __end, const _Alloc& __a)
basic_string(_InputIterator __beg, _InputIterator __end, const _Alloc& __a)
: _M_dataplus(_S_construct(__beg, __end, __a), __a)
{ }
@ -613,11 +613,11 @@ namespace std
// for input iterators and reverse iterators. It buffers internally and then
// calls _M_replace_safe.
template<typename _CharT, typename _Traits, typename _Alloc>
template<typename _InputIter>
template<typename _InputIterator>
basic_string<_CharT, _Traits, _Alloc>&
basic_string<_CharT, _Traits, _Alloc>::
_M_replace(iterator __i1, iterator __i2, _InputIter __k1,
_InputIter __k2, input_iterator_tag)
_M_replace(iterator __i1, iterator __i2, _InputIterator __k1,
_InputIterator __k2, input_iterator_tag)
{
// Save concerned source string data in a temporary.
const basic_string __s(__k1, __k2);
@ -628,11 +628,11 @@ namespace std
// and can be used in "safe" situations involving forward iterators,
// i.e., when source and destination ranges are known to not overlap.
template<typename _CharT, typename _Traits, typename _Alloc>
template<typename _ForwardIter>
template<typename _ForwardIterator>
basic_string<_CharT, _Traits, _Alloc>&
basic_string<_CharT, _Traits, _Alloc>::
_M_replace_safe(iterator __i1, iterator __i2, _ForwardIter __k1,
_ForwardIter __k2)
_M_replace_safe(iterator __i1, iterator __i2, _ForwardIterator __k1,
_ForwardIterator __k2)
{
const size_type __dnew = static_cast<size_type>(std::distance(__k1, __k2));
const size_type __dold = __i2 - __i1;

View File

@ -186,10 +186,10 @@ namespace std
}
template <typename _Tp, class _Alloc>
template <typename _InputIter>
template <typename _InputIterator>
void
deque<_Tp,_Alloc>
::_M_assign_aux(_InputIter __first, _InputIter __last, input_iterator_tag)
::_M_assign_aux(_InputIterator __first, _InputIterator __last, input_iterator_tag)
{
iterator __cur = begin();
for ( ; __first != __last && __cur != end(); ++__cur, ++__first)
@ -710,4 +710,3 @@ namespace std
} // namespace std
#endif /* __GLIBCPP_INTERNAL_DEQUE_TCC */

View File

@ -160,10 +160,10 @@ namespace std
}
template<typename _Tp, typename _Alloc>
template <typename _InputIter>
template <typename _InputIterator>
void
list<_Tp,_Alloc>::
_M_assign_dispatch(_InputIter __first2, _InputIter __last2, __false_type)
_M_assign_dispatch(_InputIterator __first2, _InputIterator __last2, __false_type)
{
iterator __first1 = begin();
iterator __last1 = end();

File diff suppressed because it is too large Load Diff

View File

@ -86,16 +86,16 @@ namespace std
* This function swaps the values pointed to by two iterators, not the
* iterators themselves.
*/
template<typename _ForwardIter1, typename _ForwardIter2>
template<typename _ForwardIterator1, typename _ForwardIterator2>
inline void
iter_swap(_ForwardIter1 __a, _ForwardIter2 __b)
iter_swap(_ForwardIterator1 __a, _ForwardIterator2 __b)
{
typedef typename iterator_traits<_ForwardIter1>::value_type _ValueType1;
typedef typename iterator_traits<_ForwardIter2>::value_type _ValueType2;
typedef typename iterator_traits<_ForwardIterator1>::value_type _ValueType1;
typedef typename iterator_traits<_ForwardIterator2>::value_type _ValueType2;
// concept requirements
__glibcpp_function_requires(_Mutable_ForwardIteratorConcept<_ForwardIter1>)
__glibcpp_function_requires(_Mutable_ForwardIteratorConcept<_ForwardIter2>)
__glibcpp_function_requires(_Mutable_ForwardIteratorConcept<_ForwardIterator1>)
__glibcpp_function_requires(_Mutable_ForwardIteratorConcept<_ForwardIterator2>)
__glibcpp_function_requires(_ConvertibleConcept<_ValueType1, _ValueType2>)
__glibcpp_function_requires(_ConvertibleConcept<_ValueType2, _ValueType1>)
@ -210,22 +210,22 @@ namespace std
// (2) If we're using random access iterators, then write the loop as
// a for loop with an explicit count.
template<typename _InputIter, typename _OutputIter>
inline _OutputIter
__copy(_InputIter __first, _InputIter __last,
_OutputIter __result, input_iterator_tag)
template<typename _InputIterator, typename _OutputIterator>
inline _OutputIterator
__copy(_InputIterator __first, _InputIterator __last,
_OutputIterator __result, input_iterator_tag)
{
for (; __first != __last; ++__result, ++__first)
*__result = *__first;
return __result;
}
template<typename _RandomAccessIter, typename _OutputIter>
inline _OutputIter
__copy(_RandomAccessIter __first, _RandomAccessIter __last,
_OutputIter __result, random_access_iterator_tag)
template<typename _RandomAccessIterator, typename _OutputIterator>
inline _OutputIterator
__copy(_RandomAccessIterator __first, _RandomAccessIterator __last,
_OutputIterator __result, random_access_iterator_tag)
{
typedef typename iterator_traits<_RandomAccessIter>::difference_type
typedef typename iterator_traits<_RandomAccessIterator>::difference_type
_Distance;
for (_Distance __n = __last - __first; __n > 0; --__n)
{
@ -244,16 +244,16 @@ namespace std
return __result + (__last - __first);
}
template<typename _InputIter, typename _OutputIter>
inline _OutputIter
__copy_aux2(_InputIter __first, _InputIter __last, _OutputIter __result,
__false_type)
template<typename _InputIterator, typename _OutputIterator>
inline _OutputIterator
__copy_aux2(_InputIterator __first, _InputIterator __last,
_OutputIterator __result, __false_type)
{ return __copy(__first, __last, __result, __iterator_category(__first)); }
template<typename _InputIter, typename _OutputIter>
inline _OutputIter
__copy_aux2(_InputIter __first, _InputIter __last, _OutputIter __result,
__true_type)
template<typename _InputIterator, typename _OutputIterator>
inline _OutputIterator
__copy_aux2(_InputIterator __first, _InputIterator __last,
_OutputIterator __result, __true_type)
{ return __copy(__first, __last, __result, __iterator_category(__first)); }
template<typename _Tp>
@ -267,45 +267,45 @@ namespace std
__true_type)
{ return __copy_trivial(__first, __last, __result); }
template<typename _InputIter, typename _OutputIter>
inline _OutputIter
__copy_ni2(_InputIter __first, _InputIter __last, _OutputIter __result,
__true_type)
template<typename _InputIterator, typename _OutputIterator>
inline _OutputIterator
__copy_ni2(_InputIterator __first, _InputIterator __last,
_OutputIterator __result, __true_type)
{
typedef typename iterator_traits<_InputIter>::value_type
typedef typename iterator_traits<_InputIterator>::value_type
_ValueType;
typedef typename __type_traits<_ValueType>::has_trivial_assignment_operator
_Trivial;
return _OutputIter(__copy_aux2(__first, __last, __result.base(),
_Trivial()));
return _OutputIterator(__copy_aux2(__first, __last, __result.base(),
_Trivial()));
}
template<typename _InputIter, typename _OutputIter>
inline _OutputIter
__copy_ni2(_InputIter __first, _InputIter __last, _OutputIter __result,
__false_type)
template<typename _InputIterator, typename _OutputIterator>
inline _OutputIterator
__copy_ni2(_InputIterator __first, _InputIterator __last,
_OutputIterator __result, __false_type)
{
typedef typename iterator_traits<_InputIter>::value_type _ValueType;
typedef typename iterator_traits<_InputIterator>::value_type _ValueType;
typedef typename __type_traits<_ValueType>::has_trivial_assignment_operator
_Trivial;
return __copy_aux2(__first, __last, __result, _Trivial());
}
template<typename _InputIter, typename _OutputIter>
inline _OutputIter
__copy_ni1(_InputIter __first, _InputIter __last, _OutputIter __result,
__true_type)
template<typename _InputIterator, typename _OutputIterator>
inline _OutputIterator
__copy_ni1(_InputIterator __first, _InputIterator __last,
_OutputIterator __result, __true_type)
{
typedef typename _Is_normal_iterator<_OutputIter>::_Normal __Normal;
typedef typename _Is_normal_iterator<_OutputIterator>::_Normal __Normal;
return __copy_ni2(__first.base(), __last.base(), __result, __Normal());
}
template<typename _InputIter, typename _OutputIter>
inline _OutputIter
__copy_ni1(_InputIter __first, _InputIter __last, _OutputIter __result,
__false_type)
template<typename _InputIterator, typename _OutputIterator>
inline _OutputIterator
__copy_ni1(_InputIterator __first, _InputIterator __last,
_OutputIterator __result, __false_type)
{
typedef typename _Is_normal_iterator<_OutputIter>::_Normal __Normal;
typedef typename _Is_normal_iterator<_OutputIterator>::_Normal __Normal;
return __copy_ni2(__first, __last, __result, __Normal());
}
@ -322,35 +322,35 @@ namespace std
* optimizations such as unrolling). If the input range and the output
* range overlap, then the copy_backward function should be used instead.
*/
template<typename _InputIter, typename _OutputIter>
inline _OutputIter
copy(_InputIter __first, _InputIter __last, _OutputIter __result)
template<typename _InputIterator, typename _OutputIterator>
inline _OutputIterator
copy(_InputIterator __first, _InputIterator __last, _OutputIterator __result)
{
// concept requirements
__glibcpp_function_requires(_InputIteratorConcept<_InputIter>)
__glibcpp_function_requires(_OutputIteratorConcept<_OutputIter,
typename iterator_traits<_InputIter>::value_type>)
__glibcpp_function_requires(_InputIteratorConcept<_InputIterator>)
__glibcpp_function_requires(_OutputIteratorConcept<_OutputIterator,
typename iterator_traits<_InputIterator>::value_type>)
typedef typename _Is_normal_iterator<_InputIter>::_Normal __Normal;
typedef typename _Is_normal_iterator<_InputIterator>::_Normal __Normal;
return __copy_ni1(__first, __last, __result, __Normal());
}
template<typename _BidirectionalIter1, typename _BidirectionalIter2>
inline _BidirectionalIter2
__copy_backward(_BidirectionalIter1 __first, _BidirectionalIter1 __last,
_BidirectionalIter2 __result, bidirectional_iterator_tag)
template<typename _BidirectionalIterator1, typename _BidirectionalIterator2>
inline _BidirectionalIterator2
__copy_backward(_BidirectionalIterator1 __first, _BidirectionalIterator1 __last,
_BidirectionalIterator2 __result, bidirectional_iterator_tag)
{
while (__first != __last)
*--__result = *--__last;
return __result;
}
template<typename _RandomAccessIter, typename _BidirectionalIter>
inline _BidirectionalIter
__copy_backward(_RandomAccessIter __first, _RandomAccessIter __last,
_BidirectionalIter __result, random_access_iterator_tag)
template<typename _RandomAccessIterator, typename _BidirectionalIterator>
inline _BidirectionalIterator
__copy_backward(_RandomAccessIterator __first, _RandomAccessIterator __last,
_BidirectionalIterator __result, random_access_iterator_tag)
{
typename iterator_traits<_RandomAccessIter>::difference_type __n;
typename iterator_traits<_RandomAccessIterator>::difference_type __n;
for (__n = __last - __first; __n > 0; --__n)
*--__result = *--__last;
return __result;
@ -361,13 +361,13 @@ namespace std
// have partial ordering of function templates. All we're doing is
// creating a specialization so that we can turn a call to copy_backward
// into a memmove whenever possible.
template<typename _BidirectionalIter1, typename _BidirectionalIter2,
template<typename _BidirectionalIterator1, typename _BidirectionalIterator2,
typename _BoolType>
struct __copy_backward_dispatch
{
static _BidirectionalIter2
copy(_BidirectionalIter1 __first, _BidirectionalIter1 __last,
_BidirectionalIter2 __result)
static _BidirectionalIterator2
copy(_BidirectionalIterator1 __first, _BidirectionalIterator1 __last,
_BidirectionalIterator2 __result)
{
return __copy_backward(__first, __last, __result,
__iterator_category(__first));
@ -483,12 +483,12 @@ namespace std
* types filling contiguous areas of memory, this becomes an inline call to
* @c memset.
*/
template<typename _ForwardIter, typename _Tp>
template<typename _ForwardIterator, typename _Tp>
void
fill(_ForwardIter __first, _ForwardIter __last, const _Tp& __value)
fill(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value)
{
// concept requirements
__glibcpp_function_requires(_Mutable_ForwardIteratorConcept<_ForwardIter>)
__glibcpp_function_requires(_Mutable_ForwardIteratorConcept<_ForwardIterator>)
for ( ; __first != __last; ++__first)
*__first = __value;
@ -505,12 +505,12 @@ namespace std
* types filling contiguous areas of memory, this becomes an inline call to
* @c memset.
*/
template<typename _OutputIter, typename _Size, typename _Tp>
_OutputIter
fill_n(_OutputIter __first, _Size __n, const _Tp& __value)
template<typename _OutputIterator, typename _Size, typename _Tp>
_OutputIterator
fill_n(_OutputIterator __first, _Size __n, const _Tp& __value)
{
// concept requirements
__glibcpp_function_requires(_OutputIteratorConcept<_OutputIter,_Tp>)
__glibcpp_function_requires(_OutputIteratorConcept<_OutputIterator,_Tp>)
for ( ; __n > 0; --__n, ++__first)
*__first = __value;
@ -576,24 +576,25 @@ namespace std
* second iterator points into the second range, and the elements pointed
* to by the iterators are not equal.
*/
template<typename _InputIter1, typename _InputIter2>
pair<_InputIter1, _InputIter2>
mismatch(_InputIter1 __first1, _InputIter1 __last1, _InputIter2 __first2)
template<typename _InputIterator1, typename _InputIterator2>
pair<_InputIterator1, _InputIterator2>
mismatch(_InputIterator1 __first1, _InputIterator1 __last1,
_InputIterator2 __first2)
{
// concept requirements
__glibcpp_function_requires(_InputIteratorConcept<_InputIter1>)
__glibcpp_function_requires(_InputIteratorConcept<_InputIter2>)
__glibcpp_function_requires(_InputIteratorConcept<_InputIterator1>)
__glibcpp_function_requires(_InputIteratorConcept<_InputIterator2>)
__glibcpp_function_requires(_EqualityComparableConcept<
typename iterator_traits<_InputIter1>::value_type>)
typename iterator_traits<_InputIterator1>::value_type>)
__glibcpp_function_requires(_EqualityComparableConcept<
typename iterator_traits<_InputIter2>::value_type>)
typename iterator_traits<_InputIterator2>::value_type>)
while (__first1 != __last1 && *__first1 == *__first2)
{
while (__first1 != __last1 && *__first1 == *__first2)
{
++__first1;
++__first2;
}
return pair<_InputIter1, _InputIter2>(__first1, __first2);
}
return pair<_InputIterator1, _InputIterator2>(__first1, __first2);
}
/**
@ -610,21 +611,21 @@ namespace std
* second iterator points into the second range, and the elements pointed
* to by the iterators are not equal.
*/
template<typename _InputIter1, typename _InputIter2, typename _BinaryPredicate>
pair<_InputIter1, _InputIter2>
mismatch(_InputIter1 __first1, _InputIter1 __last1, _InputIter2 __first2,
_BinaryPredicate __binary_pred)
template<typename _InputIterator1, typename _InputIterator2, typename _BinaryPredicate>
pair<_InputIterator1, _InputIterator2>
mismatch(_InputIterator1 __first1, _InputIterator1 __last1,
_InputIterator2 __first2, _BinaryPredicate __binary_pred)
{
// concept requirements
__glibcpp_function_requires(_InputIteratorConcept<_InputIter1>)
__glibcpp_function_requires(_InputIteratorConcept<_InputIter2>)
__glibcpp_function_requires(_InputIteratorConcept<_InputIterator1>)
__glibcpp_function_requires(_InputIteratorConcept<_InputIterator2>)
while (__first1 != __last1 && __binary_pred(*__first1, *__first2))
{
while (__first1 != __last1 && __binary_pred(*__first1, *__first2))
{
++__first1;
++__first2;
}
return pair<_InputIter1, _InputIter2>(__first1, __first2);
}
return pair<_InputIterator1, _InputIterator2>(__first1, __first2);
}
/**
@ -638,16 +639,16 @@ namespace std
* false depending on whether all of the corresponding elements of the
* ranges are equal.
*/
template<typename _InputIter1, typename _InputIter2>
template<typename _InputIterator1, typename _InputIterator2>
inline bool
equal(_InputIter1 __first1, _InputIter1 __last1, _InputIter2 __first2)
equal(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2)
{
// concept requirements
__glibcpp_function_requires(_InputIteratorConcept<_InputIter1>)
__glibcpp_function_requires(_InputIteratorConcept<_InputIter2>)
__glibcpp_function_requires(_InputIteratorConcept<_InputIterator1>)
__glibcpp_function_requires(_InputIteratorConcept<_InputIterator2>)
__glibcpp_function_requires(_EqualOpConcept<
typename iterator_traits<_InputIter1>::value_type,
typename iterator_traits<_InputIter2>::value_type>)
typename iterator_traits<_InputIterator1>::value_type,
typename iterator_traits<_InputIterator2>::value_type>)
for ( ; __first1 != __last1; ++__first1, ++__first2)
if (!(*__first1 == *__first2))
@ -668,15 +669,15 @@ namespace std
* false depending on whether all of the corresponding elements of the
* ranges are equal.
*/
template<typename _InputIter1, typename _InputIter2, typename _BinaryPredicate>
template<typename _InputIterator1, typename _InputIterator2, typename _BinaryPredicate>
inline bool
equal(_InputIter1 __first1, _InputIter1 __last1,
_InputIter2 __first2,
equal(_InputIterator1 __first1, _InputIterator1 __last1,
_InputIterator2 __first2,
_BinaryPredicate __binary_pred)
{
// concept requirements
__glibcpp_function_requires(_InputIteratorConcept<_InputIter1>)
__glibcpp_function_requires(_InputIteratorConcept<_InputIter2>)
__glibcpp_function_requires(_InputIteratorConcept<_InputIterator1>)
__glibcpp_function_requires(_InputIteratorConcept<_InputIterator2>)
for ( ; __first1 != __last1; ++__first1, ++__first2)
if (!__binary_pred(*__first1, *__first2))
@ -698,18 +699,18 @@ namespace std
* (Quoted from [25.3.8]/1.) If the iterators are all character pointers,
* then this is an inline call to @c memcmp.
*/
template<typename _InputIter1, typename _InputIter2>
template<typename _InputIterator1, typename _InputIterator2>
bool
lexicographical_compare(_InputIter1 __first1, _InputIter1 __last1,
_InputIter2 __first2, _InputIter2 __last2)
lexicographical_compare(_InputIterator1 __first1, _InputIterator1 __last1,
_InputIterator2 __first2, _InputIterator2 __last2)
{
// concept requirements
__glibcpp_function_requires(_InputIteratorConcept<_InputIter1>)
__glibcpp_function_requires(_InputIteratorConcept<_InputIter2>)
__glibcpp_function_requires(_InputIteratorConcept<_InputIterator1>)
__glibcpp_function_requires(_InputIteratorConcept<_InputIterator2>)
__glibcpp_function_requires(_LessThanComparableConcept<
typename iterator_traits<_InputIter1>::value_type>)
typename iterator_traits<_InputIterator1>::value_type>)
__glibcpp_function_requires(_LessThanComparableConcept<
typename iterator_traits<_InputIter2>::value_type>)
typename iterator_traits<_InputIterator2>::value_type>)
for (;__first1 != __last1 && __first2 != __last2; ++__first1, ++__first2)
{
@ -733,15 +734,15 @@ namespace std
* The same as the four-parameter @c lexigraphical_compare, but uses the
* comp parameter instead of @c <.
*/
template<typename _InputIter1, typename _InputIter2, typename _Compare>
template<typename _InputIterator1, typename _InputIterator2, typename _Compare>
bool
lexicographical_compare(_InputIter1 __first1, _InputIter1 __last1,
_InputIter2 __first2, _InputIter2 __last2,
lexicographical_compare(_InputIterator1 __first1, _InputIterator1 __last1,
_InputIterator2 __first2, _InputIterator2 __last2,
_Compare __comp)
{
// concept requirements
__glibcpp_function_requires(_InputIteratorConcept<_InputIter1>)
__glibcpp_function_requires(_InputIteratorConcept<_InputIter2>)
__glibcpp_function_requires(_InputIteratorConcept<_InputIterator1>)
__glibcpp_function_requires(_InputIteratorConcept<_InputIterator2>)
for ( ; __first1 != __last1 && __first2 != __last2
; ++__first1, ++__first2)

View File

@ -575,8 +575,8 @@ template <typename _Alloc>
void _M_assign_dispatch(_Integer __n, _Integer __val, __true_type)
{ _M_fill_assign((size_t) __n, (bool) __val); }
template <class _InputIter>
void _M_assign_dispatch(_InputIter __first, _InputIter __last, __false_type)
template <class _InputIterator>
void _M_assign_dispatch(_InputIterator __first, _InputIterator __last, __false_type)
{ _M_assign_aux(__first, __last, __iterator_category(__first)); }
template <class _InputIterator>

View File

@ -1112,7 +1112,7 @@ namespace std
/**
* @brief Inserts a range into the %deque.
* @param pos An iterator into the %deque.
* @param position An iterator into the %deque.
* @param first An input iterator.
* @param last An input iterator.
*
@ -1122,11 +1122,11 @@ namespace std
*/
template<typename _InputIterator>
void
insert(iterator __pos, _InputIterator __first, _InputIterator __last)
insert(iterator __position, _InputIterator __first, _InputIterator __last)
{
// Check whether it's an integral type. If so, it's not an iterator.
typedef typename _Is_integer<_InputIterator>::_Integral _Integral;
_M_insert_dispatch(__pos, __first, __last, _Integral());
_M_insert_dispatch(__position, __first, __last, _Integral());
}
/**
@ -1203,12 +1203,12 @@ namespace std
}
// called by the range constructor to implement [23.1.1]/9
template<typename _InputIter>
template<typename _InputIterator>
void
_M_initialize_dispatch(_InputIter __first, _InputIter __last,
_M_initialize_dispatch(_InputIterator __first, _InputIterator __last,
__false_type)
{
typedef typename iterator_traits<_InputIter>::iterator_category
typedef typename iterator_traits<_InputIterator>::iterator_category
_IterCategory;
_M_range_initialize(__first, __last, _IterCategory());
}
@ -1268,11 +1268,11 @@ namespace std
}
// called by the range assign to implement [23.1.1]/9
template<typename _InputIter>
template<typename _InputIterator>
void
_M_assign_dispatch(_InputIter __first, _InputIter __last, __false_type)
_M_assign_dispatch(_InputIterator __first, _InputIterator __last, __false_type)
{
typedef typename iterator_traits<_InputIter>::iterator_category
typedef typename iterator_traits<_InputIterator>::iterator_category
_IterCategory;
_M_assign_aux(__first, __last, _IterCategory());
}

View File

@ -114,12 +114,12 @@ namespace std
return __distance(__first, __last, __iterator_category(__first));
}
template<typename _InputIter, typename _Distance>
template<typename _InputIterator, typename _Distance>
inline void
__advance(_InputIter& __i, _Distance __n, input_iterator_tag)
__advance(_InputIterator& __i, _Distance __n, input_iterator_tag)
{
// concept requirements
__glibcpp_function_requires(_InputIteratorConcept<_InputIter>)
__glibcpp_function_requires(_InputIteratorConcept<_InputIterator>)
while (__n--) ++__i;
}

View File

@ -773,12 +773,12 @@ namespace std
* time, and does not invalidate iterators and references.
*/
void
insert(iterator __pos, size_type __n, const value_type& __x)
{ _M_fill_insert(__pos, __n, __x); }
insert(iterator __position, size_type __n, const value_type& __x)
{ _M_fill_insert(__position, __n, __x); }
/**
* @brief Inserts a range into the %list.
* @param pos An iterator into the %list.
* @param position An iterator into the %list.
* @param first An input iterator.
* @param last An input iterator.
*
@ -790,11 +790,11 @@ namespace std
*/
template<typename _InputIterator>
void
insert(iterator __pos, _InputIterator __first, _InputIterator __last)
insert(iterator __position, _InputIterator __first, _InputIterator __last)
{
// Check whether it's an integral type. If so, it's not an iterator.
typedef typename _Is_integer<_InputIterator>::_Integral _Integral;
_M_insert_dispatch(__pos, __first, __last, _Integral());
_M_insert_dispatch(__position, __first, __last, _Integral());
}
/**
@ -968,9 +968,9 @@ namespace std
}
// called by the range assign to implement [23.1.1]/9
template<typename _InputIter>
template<typename _InputIterator>
void
_M_assign_dispatch(_InputIter __first, _InputIter __last, __false_type);
_M_assign_dispatch(_InputIterator __first, _InputIterator __last, __false_type);
// Called by assign(n,t), and the range assign when it turns out to be the
// same thing.

View File

@ -271,7 +271,3 @@ inline void swap(multiset<_Key,_Compare,_Alloc>& __x,
} // namespace std
#endif /* __GLIBCPP_INTERNAL_MULTISET_H */
// Local Variables:
// mode:C++
// End:

View File

@ -209,7 +209,3 @@ namespace std
} // namespace std
#endif /* _CPP_BITS_STL_NUMERIC_H */
// Local Variables:
// mode:C++
// End:

View File

@ -135,7 +135,3 @@ inline bool operator>=(const _Tp& __x, const _Tp& __y) {
} // namespace std
#endif /* _CPP_BITS_STL_RELOPS_H */
// Local Variables:
// mode:C++
// End:

View File

@ -268,7 +268,3 @@ inline void swap(set<_Key,_Compare,_Alloc>& __x,
} // namespace std
#endif /* __GLIBCPP_INTERNAL_SET_H */
// Local Variables:
// mode:C++
// End:

View File

@ -208,7 +208,7 @@ namespace std
private:
void operator=(const _STL_auto_lock&);
_STL_auto_lock(const _STL_auto_lock&);
};
} __attribute__ ((__unused__));
} // namespace std

View File

@ -68,20 +68,20 @@ namespace std
// uninitialized_copy
template<typename _InputIter, typename _ForwardIter>
inline _ForwardIter
__uninitialized_copy_aux(_InputIter __first, _InputIter __last,
_ForwardIter __result,
template<typename _InputIterator, typename _ForwardIterator>
inline _ForwardIterator
__uninitialized_copy_aux(_InputIterator __first, _InputIterator __last,
_ForwardIterator __result,
__true_type)
{ return copy(__first, __last, __result); }
template<typename _InputIter, typename _ForwardIter>
_ForwardIter
__uninitialized_copy_aux(_InputIter __first, _InputIter __last,
_ForwardIter __result,
template<typename _InputIterator, typename _ForwardIterator>
_ForwardIterator
__uninitialized_copy_aux(_InputIterator __first, _InputIterator __last,
_ForwardIterator __result,
__false_type)
{
_ForwardIter __cur = __result;
_ForwardIterator __cur = __result;
try {
for ( ; __first != __last; ++__first, ++__cur)
_Construct(&*__cur, *__first);
@ -103,11 +103,11 @@ namespace std
*
* Like copy(), but does not require an initialized output range.
*/
template<typename _InputIter, typename _ForwardIter>
inline _ForwardIter
uninitialized_copy(_InputIter __first, _InputIter __last, _ForwardIter __result)
template<typename _InputIterator, typename _ForwardIterator>
inline _ForwardIterator
uninitialized_copy(_InputIterator __first, _InputIterator __last, _ForwardIterator __result)
{
typedef typename iterator_traits<_ForwardIter>::value_type _ValueType;
typedef typename iterator_traits<_ForwardIterator>::value_type _ValueType;
typedef typename __type_traits<_ValueType>::is_POD_type _Is_POD;
return __uninitialized_copy_aux(__first, __last, __result, _Is_POD());
}
@ -129,18 +129,18 @@ namespace std
// Valid if copy construction is equivalent to assignment, and if the
// destructor is trivial.
template<typename _ForwardIter, typename _Tp>
template<typename _ForwardIterator, typename _Tp>
inline void
__uninitialized_fill_aux(_ForwardIter __first, _ForwardIter __last,
__uninitialized_fill_aux(_ForwardIterator __first, _ForwardIterator __last,
const _Tp& __x, __true_type)
{ fill(__first, __last, __x); }
template<typename _ForwardIter, typename _Tp>
template<typename _ForwardIterator, typename _Tp>
void
__uninitialized_fill_aux(_ForwardIter __first, _ForwardIter __last,
__uninitialized_fill_aux(_ForwardIterator __first, _ForwardIterator __last,
const _Tp& __x, __false_type)
{
_ForwardIter __cur = __first;
_ForwardIterator __cur = __first;
try {
for ( ; __cur != __last; ++__cur)
_Construct(&*__cur, __x);
@ -161,31 +161,31 @@ namespace std
*
* Like fill(), but does not require an initialized output range.
*/
template<typename _ForwardIter, typename _Tp>
template<typename _ForwardIterator, typename _Tp>
inline void
uninitialized_fill(_ForwardIter __first, _ForwardIter __last, const _Tp& __x)
uninitialized_fill(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __x)
{
typedef typename iterator_traits<_ForwardIter>::value_type _ValueType;
typedef typename iterator_traits<_ForwardIterator>::value_type _ValueType;
typedef typename __type_traits<_ValueType>::is_POD_type _Is_POD;
__uninitialized_fill_aux(__first, __last, __x, _Is_POD());
}
// Valid if copy construction is equivalent to assignment, and if the
// destructor is trivial.
template<typename _ForwardIter, typename _Size, typename _Tp>
inline _ForwardIter
__uninitialized_fill_n_aux(_ForwardIter __first, _Size __n,
template<typename _ForwardIterator, typename _Size, typename _Tp>
inline _ForwardIterator
__uninitialized_fill_n_aux(_ForwardIterator __first, _Size __n,
const _Tp& __x, __true_type)
{
return fill_n(__first, __n, __x);
}
template<typename _ForwardIter, typename _Size, typename _Tp>
_ForwardIter
__uninitialized_fill_n_aux(_ForwardIter __first, _Size __n,
template<typename _ForwardIterator, typename _Size, typename _Tp>
_ForwardIterator
__uninitialized_fill_n_aux(_ForwardIterator __first, _Size __n,
const _Tp& __x, __false_type)
{
_ForwardIter __cur = __first;
_ForwardIterator __cur = __first;
try {
for ( ; __n > 0; --__n, ++__cur)
_Construct(&*__cur, __x);
@ -207,11 +207,11 @@ namespace std
*
* Like fill_n(), but does not require an initialized output range.
*/
template<typename _ForwardIter, typename _Size, typename _Tp>
inline _ForwardIter
uninitialized_fill_n(_ForwardIter __first, _Size __n, const _Tp& __x)
template<typename _ForwardIterator, typename _Size, typename _Tp>
inline _ForwardIterator
uninitialized_fill_n(_ForwardIterator __first, _Size __n, const _Tp& __x)
{
typedef typename iterator_traits<_ForwardIter>::value_type _ValueType;
typedef typename iterator_traits<_ForwardIterator>::value_type _ValueType;
typedef typename __type_traits<_ValueType>::is_POD_type _Is_POD;
return __uninitialized_fill_n_aux(__first, __n, __x, _Is_POD());
}
@ -224,13 +224,13 @@ namespace std
// copies [first2, last2) into
// [result, result + (last1 - first1) + (last2 - first2)).
template<typename _InputIter1, typename _InputIter2, typename _ForwardIter>
inline _ForwardIter
__uninitialized_copy_copy(_InputIter1 __first1, _InputIter1 __last1,
_InputIter2 __first2, _InputIter2 __last2,
_ForwardIter __result)
template<typename _InputIterator1, typename _InputIterator2, typename _ForwardIterator>
inline _ForwardIterator
__uninitialized_copy_copy(_InputIterator1 __first1, _InputIterator1 __last1,
_InputIterator2 __first2, _InputIterator2 __last2,
_ForwardIterator __result)
{
_ForwardIter __mid = uninitialized_copy(__first1, __last1, __result);
_ForwardIterator __mid = uninitialized_copy(__first1, __last1, __result);
try {
return uninitialized_copy(__first2, __last2, __mid);
}
@ -244,11 +244,11 @@ namespace std
// __uninitialized_fill_copy
// Fills [result, mid) with x, and copies [first, last) into
// [mid, mid + (last - first)).
template<typename _ForwardIter, typename _Tp, typename _InputIter>
inline _ForwardIter
__uninitialized_fill_copy(_ForwardIter __result, _ForwardIter __mid,
template<typename _ForwardIterator, typename _Tp, typename _InputIterator>
inline _ForwardIterator
__uninitialized_fill_copy(_ForwardIterator __result, _ForwardIterator __mid,
const _Tp& __x,
_InputIter __first, _InputIter __last)
_InputIterator __first, _InputIterator __last)
{
uninitialized_fill(__result, __mid, __x);
try {
@ -264,13 +264,13 @@ namespace std
// __uninitialized_copy_fill
// Copies [first1, last1) into [first2, first2 + (last1 - first1)), and
// fills [first2 + (last1 - first1), last2) with x.
template<typename _InputIter, typename _ForwardIter, typename _Tp>
template<typename _InputIterator, typename _ForwardIterator, typename _Tp>
inline void
__uninitialized_copy_fill(_InputIter __first1, _InputIter __last1,
_ForwardIter __first2, _ForwardIter __last2,
__uninitialized_copy_fill(_InputIterator __first1, _InputIterator __last1,
_ForwardIterator __first2, _ForwardIterator __last2,
const _Tp& __x)
{
_ForwardIter __mid2 = uninitialized_copy(__first1, __last1, __first2);
_ForwardIterator __mid2 = uninitialized_copy(__first1, __last1, __first2);
try {
uninitialized_fill(__mid2, __last2, __x);
}
@ -284,7 +284,3 @@ namespace std
} // namespace std
#endif /* _CPP_BITS_STL_UNINITIALIZED_H */
// Local Variables:
// mode:C++
// End:

View File

@ -650,12 +650,12 @@ namespace std
* consider using std::list.
*/
void
insert(iterator __pos, size_type __n, const value_type& __x)
{ _M_fill_insert(__pos, __n, __x); }
insert(iterator __position, size_type __n, const value_type& __x)
{ _M_fill_insert(__position, __n, __x); }
/**
* @brief Inserts a range into the %vector.
* @param pos An iterator into the %vector.
* @param position An iterator into the %vector.
* @param first An input iterator.
* @param last An input iterator.
*
@ -669,11 +669,11 @@ namespace std
*/
template<typename _InputIterator>
void
insert(iterator __pos, _InputIterator __first, _InputIterator __last)
insert(iterator __position, _InputIterator __first, _InputIterator __last)
{
// Check whether it's an integral type. If so, it's not an iterator.
typedef typename _Is_integer<_InputIterator>::_Integral _Integral;
_M_insert_dispatch(__pos, __first, __last, _Integral());
_M_insert_dispatch(__position, __first, __last, _Integral());
}
/**
@ -780,12 +780,12 @@ namespace std
}
// Called by the range constructor to implement [23.1.1]/9
template<typename _InputIter>
template<typename _InputIterator>
void
_M_initialize_dispatch(_InputIter __first, _InputIter __last,
_M_initialize_dispatch(_InputIterator __first, _InputIterator __last,
__false_type)
{
typedef typename iterator_traits<_InputIter>::iterator_category
typedef typename iterator_traits<_InputIterator>::iterator_category
_IterCategory;
_M_range_initialize(__first, __last, _IterCategory());
}
@ -827,11 +827,11 @@ namespace std
}
// Called by the range assign to implement [23.1.1]/9
template<typename _InputIter>
template<typename _InputIterator>
void
_M_assign_dispatch(_InputIter __first, _InputIter __last, __false_type)
_M_assign_dispatch(_InputIterator __first, _InputIterator __last, __false_type)
{
typedef typename iterator_traits<_InputIter>::iterator_category
typedef typename iterator_traits<_InputIterator>::iterator_category
_IterCategory;
_M_assign_aux(__first, __last, _IterCategory());
}

View File

@ -176,10 +176,10 @@ namespace std
erase(fill_n(begin(), __n, __val), end());
}
template<typename _Tp, typename _Alloc> template<typename _InputIter>
template<typename _Tp, typename _Alloc> template<typename _InputIterator>
void
vector<_Tp,_Alloc>::
_M_assign_aux(_InputIter __first, _InputIter __last, input_iterator_tag)
_M_assign_aux(_InputIterator __first, _InputIterator __last, input_iterator_tag)
{
iterator __cur(begin());
for ( ; __first != __last && __cur != end(); ++__cur, ++__first)
@ -190,10 +190,10 @@ namespace std
insert(end(), __first, __last);
}
template<typename _Tp, typename _Alloc> template<typename _ForwardIter>
template<typename _Tp, typename _Alloc> template<typename _ForwardIterator>
void
vector<_Tp,_Alloc>::
_M_assign_aux(_ForwardIter __first, _ForwardIter __last,
_M_assign_aux(_ForwardIterator __first, _ForwardIterator __last,
forward_iterator_tag)
{
size_type __len = std::distance(__first, __last);
@ -215,7 +215,7 @@ namespace std
}
else
{
_ForwardIter __mid = __first;
_ForwardIterator __mid = __first;
advance(__mid, size());
copy(__first, __mid, this->_M_start);
this->_M_finish = uninitialized_copy(__mid, __last, this->_M_finish);

View File

@ -77,10 +77,10 @@ namespace __gnu_cxx
//--------------------------------------------------
// copy_n (not part of the C++ standard)
template<typename _InputIter, typename _Size, typename _OutputIter>
pair<_InputIter, _OutputIter>
__copy_n(_InputIter __first, _Size __count,
_OutputIter __result,
template<typename _InputIterator, typename _Size, typename _OutputIterator>
pair<_InputIterator, _OutputIterator>
__copy_n(_InputIterator __first, _Size __count,
_OutputIterator __result,
input_iterator_tag)
{
for ( ; __count > 0; --__count) {
@ -88,17 +88,17 @@ namespace __gnu_cxx
++__first;
++__result;
}
return pair<_InputIter, _OutputIter>(__first, __result);
return pair<_InputIterator, _OutputIterator>(__first, __result);
}
template<typename _RAIter, typename _Size, typename _OutputIter>
inline pair<_RAIter, _OutputIter>
__copy_n(_RAIter __first, _Size __count,
_OutputIter __result,
template<typename _RAIterator, typename _Size, typename _OutputIterator>
inline pair<_RAIterator, _OutputIterator>
__copy_n(_RAIterator __first, _Size __count,
_OutputIterator __result,
random_access_iterator_tag)
{
_RAIter __last = __first + __count;
return pair<_RAIter, _OutputIter>(__last,
_RAIterator __last = __first + __count;
return pair<_RAIterator, _OutputIterator>(__last,
std::copy(__first, __last, __result));
}
@ -116,23 +116,23 @@ namespace __gnu_cxx
* optimizations such as unrolling).
* @ingroup SGIextensions
*/
template<typename _InputIter, typename _Size, typename _OutputIter>
inline pair<_InputIter, _OutputIter>
copy_n(_InputIter __first, _Size __count, _OutputIter __result)
template<typename _InputIterator, typename _Size, typename _OutputIterator>
inline pair<_InputIterator, _OutputIterator>
copy_n(_InputIterator __first, _Size __count, _OutputIterator __result)
{
// concept requirements
__glibcpp_function_requires(_InputIteratorConcept<_InputIter>)
__glibcpp_function_requires(_OutputIteratorConcept<_OutputIter,
typename iterator_traits<_InputIter>::value_type>)
__glibcpp_function_requires(_InputIteratorConcept<_InputIterator>)
__glibcpp_function_requires(_OutputIteratorConcept<_OutputIterator,
typename iterator_traits<_InputIterator>::value_type>)
return __copy_n(__first, __count, __result,
std::__iterator_category(__first));
}
template<typename _InputIter1, typename _InputIter2>
template<typename _InputIterator1, typename _InputIterator2>
int
__lexicographical_compare_3way(_InputIter1 __first1, _InputIter1 __last1,
_InputIter2 __first2, _InputIter2 __last2)
__lexicographical_compare_3way(_InputIterator1 __first1, _InputIterator1 __last1,
_InputIterator2 __first2, _InputIterator2 __last2)
{
while (__first1 != __last1 && __first2 != __last2) {
if (*__first1 < *__first2)
@ -195,18 +195,18 @@ namespace __gnu_cxx
* This is an SGI extension.
* @ingroup SGIextensions
*/
template<typename _InputIter1, typename _InputIter2>
template<typename _InputIterator1, typename _InputIterator2>
int
lexicographical_compare_3way(_InputIter1 __first1, _InputIter1 __last1,
_InputIter2 __first2, _InputIter2 __last2)
lexicographical_compare_3way(_InputIterator1 __first1, _InputIterator1 __last1,
_InputIterator2 __first2, _InputIterator2 __last2)
{
// concept requirements
__glibcpp_function_requires(_InputIteratorConcept<_InputIter1>)
__glibcpp_function_requires(_InputIteratorConcept<_InputIter2>)
__glibcpp_function_requires(_InputIteratorConcept<_InputIterator1>)
__glibcpp_function_requires(_InputIteratorConcept<_InputIterator2>)
__glibcpp_function_requires(_LessThanComparableConcept<
typename iterator_traits<_InputIter1>::value_type>)
typename iterator_traits<_InputIterator1>::value_type>)
__glibcpp_function_requires(_LessThanComparableConcept<
typename iterator_traits<_InputIter2>::value_type>)
typename iterator_traits<_InputIterator2>::value_type>)
return __lexicographical_compare_3way(__first1, __last1, __first2, __last2);
}
@ -214,32 +214,32 @@ namespace __gnu_cxx
// count and count_if: this version, whose return type is void, was present
// in the HP STL, and is retained as an extension for backward compatibility.
template<typename _InputIter, typename _Tp, typename _Size>
template<typename _InputIterator, typename _Tp, typename _Size>
void
count(_InputIter __first, _InputIter __last,
count(_InputIterator __first, _InputIterator __last,
const _Tp& __value,
_Size& __n)
{
// concept requirements
__glibcpp_function_requires(_InputIteratorConcept<_InputIter>)
__glibcpp_function_requires(_InputIteratorConcept<_InputIterator>)
__glibcpp_function_requires(_EqualityComparableConcept<
typename iterator_traits<_InputIter>::value_type >)
typename iterator_traits<_InputIterator>::value_type >)
__glibcpp_function_requires(_EqualityComparableConcept<_Tp>)
for ( ; __first != __last; ++__first)
if (*__first == __value)
++__n;
}
template<typename _InputIter, typename _Predicate, typename _Size>
template<typename _InputIterator, typename _Predicate, typename _Size>
void
count_if(_InputIter __first, _InputIter __last,
count_if(_InputIterator __first, _InputIterator __last,
_Predicate __pred,
_Size& __n)
{
// concept requirements
__glibcpp_function_requires(_InputIteratorConcept<_InputIter>)
__glibcpp_function_requires(_InputIteratorConcept<_InputIterator>)
__glibcpp_function_requires(_UnaryPredicateConcept<_Predicate,
typename iterator_traits<_InputIter>::value_type>)
typename iterator_traits<_InputIterator>::value_type>)
for ( ; __first != __last; ++__first)
if (__pred(*__first))
++__n;
@ -252,15 +252,15 @@ namespace __gnu_cxx
* @ingroup SGIextensions
* @doctodo
*/
template<typename _ForwardIter, typename _OutputIter, typename _Distance>
_OutputIter
random_sample_n(_ForwardIter __first, _ForwardIter __last,
_OutputIter __out, const _Distance __n)
template<typename _ForwardIterator, typename _OutputIterator, typename _Distance>
_OutputIterator
random_sample_n(_ForwardIterator __first, _ForwardIterator __last,
_OutputIterator __out, const _Distance __n)
{
// concept requirements
__glibcpp_function_requires(_ForwardIteratorConcept<_ForwardIter>)
__glibcpp_function_requires(_OutputIteratorConcept<_OutputIter,
typename iterator_traits<_ForwardIter>::value_type>)
__glibcpp_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
__glibcpp_function_requires(_OutputIteratorConcept<_OutputIterator,
typename iterator_traits<_ForwardIterator>::value_type>)
_Distance __remaining = std::distance(__first, __last);
_Distance __m = min(__n, __remaining);
@ -283,17 +283,17 @@ namespace __gnu_cxx
* @ingroup SGIextensions
* @doctodo
*/
template<typename _ForwardIter, typename _OutputIter, typename _Distance,
template<typename _ForwardIterator, typename _OutputIterator, typename _Distance,
typename _RandomNumberGenerator>
_OutputIter
random_sample_n(_ForwardIter __first, _ForwardIter __last,
_OutputIter __out, const _Distance __n,
_OutputIterator
random_sample_n(_ForwardIterator __first, _ForwardIterator __last,
_OutputIterator __out, const _Distance __n,
_RandomNumberGenerator& __rand)
{
// concept requirements
__glibcpp_function_requires(_ForwardIteratorConcept<_ForwardIter>)
__glibcpp_function_requires(_OutputIteratorConcept<_OutputIter,
typename iterator_traits<_ForwardIter>::value_type>)
__glibcpp_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
__glibcpp_function_requires(_OutputIteratorConcept<_OutputIterator,
typename iterator_traits<_ForwardIterator>::value_type>)
__glibcpp_function_requires(_UnaryFunctionConcept<
_RandomNumberGenerator, _Distance, _Distance>)
@ -313,10 +313,10 @@ namespace __gnu_cxx
return __out;
}
template<typename _InputIter, typename _RandomAccessIter, typename _Distance>
_RandomAccessIter
__random_sample(_InputIter __first, _InputIter __last,
_RandomAccessIter __out,
template<typename _InputIterator, typename _RandomAccessIterator, typename _Distance>
_RandomAccessIterator
__random_sample(_InputIterator __first, _InputIterator __last,
_RandomAccessIterator __out,
const _Distance __n)
{
_Distance __m = 0;
@ -335,11 +335,11 @@ namespace __gnu_cxx
return __out + __m;
}
template<typename _InputIter, typename _RandomAccessIter,
template<typename _InputIterator, typename _RandomAccessIterator,
typename _RandomNumberGenerator, typename _Distance>
_RandomAccessIter
__random_sample(_InputIter __first, _InputIter __last,
_RandomAccessIter __out,
_RandomAccessIterator
__random_sample(_InputIterator __first, _InputIterator __last,
_RandomAccessIterator __out,
_RandomNumberGenerator& __rand,
const _Distance __n)
{
@ -368,15 +368,15 @@ namespace __gnu_cxx
* @ingroup SGIextensions
* @doctodo
*/
template<typename _InputIter, typename _RandomAccessIter>
inline _RandomAccessIter
random_sample(_InputIter __first, _InputIter __last,
_RandomAccessIter __out_first, _RandomAccessIter __out_last)
template<typename _InputIterator, typename _RandomAccessIterator>
inline _RandomAccessIterator
random_sample(_InputIterator __first, _InputIterator __last,
_RandomAccessIterator __out_first, _RandomAccessIterator __out_last)
{
// concept requirements
__glibcpp_function_requires(_InputIteratorConcept<_InputIter>)
__glibcpp_function_requires(_InputIteratorConcept<_InputIterator>)
__glibcpp_function_requires(_Mutable_RandomAccessIteratorConcept<
_RandomAccessIter>)
_RandomAccessIterator>)
return __random_sample(__first, __last,
__out_first, __out_last - __out_first);
@ -387,17 +387,17 @@ namespace __gnu_cxx
* @ingroup SGIextensions
* @doctodo
*/
template<typename _InputIter, typename _RandomAccessIter,
template<typename _InputIterator, typename _RandomAccessIterator,
typename _RandomNumberGenerator>
inline _RandomAccessIter
random_sample(_InputIter __first, _InputIter __last,
_RandomAccessIter __out_first, _RandomAccessIter __out_last,
inline _RandomAccessIterator
random_sample(_InputIterator __first, _InputIterator __last,
_RandomAccessIterator __out_first, _RandomAccessIterator __out_last,
_RandomNumberGenerator& __rand)
{
// concept requirements
__glibcpp_function_requires(_InputIteratorConcept<_InputIter>)
__glibcpp_function_requires(_InputIteratorConcept<_InputIterator>)
__glibcpp_function_requires(_Mutable_RandomAccessIteratorConcept<
_RandomAccessIter>)
_RandomAccessIterator>)
return __random_sample(__first, __last,
__out_first, __rand,
@ -408,9 +408,9 @@ namespace __gnu_cxx
// a heap. This function is an extension, not part of the C++
// standard.
template<typename _RandomAccessIter, typename _Distance>
template<typename _RandomAccessIterator, typename _Distance>
bool
__is_heap(_RandomAccessIter __first, _Distance __n)
__is_heap(_RandomAccessIterator __first, _Distance __n)
{
_Distance __parent = 0;
for (_Distance __child = 1; __child < __n; ++__child) {
@ -422,10 +422,10 @@ namespace __gnu_cxx
return true;
}
template<typename _RandomAccessIter, typename _Distance,
template<typename _RandomAccessIterator, typename _Distance,
typename _StrictWeakOrdering>
bool
__is_heap(_RandomAccessIter __first, _StrictWeakOrdering __comp,
__is_heap(_RandomAccessIterator __first, _StrictWeakOrdering __comp,
_Distance __n)
{
_Distance __parent = 0;
@ -443,14 +443,14 @@ namespace __gnu_cxx
* @ingroup SGIextensions
* @doctodo
*/
template<typename _RandomAccessIter>
template<typename _RandomAccessIterator>
inline bool
is_heap(_RandomAccessIter __first, _RandomAccessIter __last)
is_heap(_RandomAccessIterator __first, _RandomAccessIterator __last)
{
// concept requirements
__glibcpp_function_requires(_RandomAccessIteratorConcept<_RandomAccessIter>)
__glibcpp_function_requires(_RandomAccessIteratorConcept<_RandomAccessIterator>)
__glibcpp_function_requires(_LessThanComparableConcept<
typename iterator_traits<_RandomAccessIter>::value_type>)
typename iterator_traits<_RandomAccessIterator>::value_type>)
return __is_heap(__first, __last - __first);
}
@ -460,16 +460,16 @@ namespace __gnu_cxx
* @ingroup SGIextensions
* @doctodo
*/
template<typename _RandomAccessIter, typename _StrictWeakOrdering>
template<typename _RandomAccessIterator, typename _StrictWeakOrdering>
inline bool
is_heap(_RandomAccessIter __first, _RandomAccessIter __last,
is_heap(_RandomAccessIterator __first, _RandomAccessIterator __last,
_StrictWeakOrdering __comp)
{
// concept requirements
__glibcpp_function_requires(_RandomAccessIteratorConcept<_RandomAccessIter>)
__glibcpp_function_requires(_RandomAccessIteratorConcept<_RandomAccessIterator>)
__glibcpp_function_requires(_BinaryPredicateConcept<_StrictWeakOrdering,
typename iterator_traits<_RandomAccessIter>::value_type,
typename iterator_traits<_RandomAccessIter>::value_type>)
typename iterator_traits<_RandomAccessIterator>::value_type,
typename iterator_traits<_RandomAccessIterator>::value_type>)
return __is_heap(__first, __comp, __last - __first);
}
@ -483,19 +483,19 @@ namespace __gnu_cxx
* @ingroup SGIextensions
* @doctodo
*/
template<typename _ForwardIter>
template<typename _ForwardIterator>
bool
is_sorted(_ForwardIter __first, _ForwardIter __last)
is_sorted(_ForwardIterator __first, _ForwardIterator __last)
{
// concept requirements
__glibcpp_function_requires(_ForwardIteratorConcept<_ForwardIter>)
__glibcpp_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
__glibcpp_function_requires(_LessThanComparableConcept<
typename iterator_traits<_ForwardIter>::value_type>)
typename iterator_traits<_ForwardIterator>::value_type>)
if (__first == __last)
return true;
_ForwardIter __next = __first;
_ForwardIterator __next = __first;
for (++__next; __next != __last; __first = __next, ++__next) {
if (*__next < *__first)
return false;
@ -509,20 +509,20 @@ namespace __gnu_cxx
* @ingroup SGIextensions
* @doctodo
*/
template<typename _ForwardIter, typename _StrictWeakOrdering>
template<typename _ForwardIterator, typename _StrictWeakOrdering>
bool
is_sorted(_ForwardIter __first, _ForwardIter __last, _StrictWeakOrdering __comp)
is_sorted(_ForwardIterator __first, _ForwardIterator __last, _StrictWeakOrdering __comp)
{
// concept requirements
__glibcpp_function_requires(_ForwardIteratorConcept<_ForwardIter>)
__glibcpp_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
__glibcpp_function_requires(_BinaryPredicateConcept<_StrictWeakOrdering,
typename iterator_traits<_ForwardIter>::value_type,
typename iterator_traits<_ForwardIter>::value_type>)
typename iterator_traits<_ForwardIterator>::value_type,
typename iterator_traits<_ForwardIterator>::value_type>)
if (__first == __last)
return true;
_ForwardIter __next = __first;
_ForwardIterator __next = __first;
for (++__next; __next != __last; __first = __next, ++__next) {
if (__comp(*__next, *__first))
return false;

View File

@ -474,10 +474,10 @@ private:
}
// Check whether it's an integral type. If so, it's not an iterator.
template <class _InIter>
template <class _InIterator>
void _M_insert_after_range(_Node_base* __pos,
_InIter __first, _InIter __last) {
typedef typename _Is_integer<_InIter>::_Integral _Integral;
_InIterator __first, _InIterator __last) {
typedef typename _Is_integer<_InIterator>::_Integral _Integral;
_M_insert_after_range(__pos, __first, __last, _Integral());
}
@ -487,9 +487,9 @@ private:
_M_insert_after_fill(__pos, __n, __x);
}
template <class _InIter>
template <class _InIterator>
void _M_insert_after_range(_Node_base* __pos,
_InIter __first, _InIter __last,
_InIterator __first, _InIterator __last,
__false_type) {
while (__first != __last) {
__pos = __slist_make_link(__pos, _M_create_node(*__first));
@ -513,8 +513,8 @@ public:
// We don't need any dispatching tricks here, because _M_insert_after_range
// already does them.
template <class _InIter>
void insert_after(iterator __pos, _InIter __first, _InIter __last) {
template <class _InIterator>
void insert_after(iterator __pos, _InIterator __first, _InIterator __last) {
_M_insert_after_range(__pos._M_node, __first, __last);
}
@ -537,8 +537,8 @@ public:
// We don't need any dispatching tricks here, because _M_insert_after_range
// already does them.
template <class _InIter>
void insert(iterator __pos, _InIter __first, _InIter __last) {
template <class _InIterator>
void insert(iterator __pos, _InIterator __first, _InIterator __last) {
_M_insert_after_range(__slist_previous(&this->_M_head, __pos._M_node),
__first, __last);
}
@ -678,9 +678,9 @@ void slist<_Tp, _Alloc>::_M_fill_assign(size_type __n, const _Tp& __val) {
this->_M_erase_after(__prev, 0);
}
template <class _Tp, class _Alloc> template <class _InputIter>
template <class _Tp, class _Alloc> template <class _InputIterator>
void
slist<_Tp, _Alloc>::_M_assign_dispatch(_InputIter __first, _InputIter __last,
slist<_Tp, _Alloc>::_M_assign_dispatch(_InputIterator __first, _InputIterator __last,
__false_type)
{
_Node_base* __prev = &this->_M_head;

View File

@ -698,7 +698,7 @@ namespace std
/**
* @brief Use a subset of a string.
* @param s A string of '0' and '1' characters.
* @param pos Index of the first character in @a s to use; defaults
* @param position Index of the first character in @a s to use; defaults
* to zero.
* @throw std::out_of_range If @a pos is bigger the size of @a s.
* @throw std::invalid_argument If a character appears in the string
@ -706,18 +706,18 @@ namespace std
*/
template<class _CharT, class _Traits, class _Alloc>
explicit bitset(const basic_string<_CharT, _Traits, _Alloc>& __s,
size_t __pos = 0) : _Base()
size_t __position = 0) : _Base()
{
if (__pos > __s.size())
if (__position > __s.size())
__throw_out_of_range("bitset::bitset initial position not valid");
_M_copy_from_string(__s, __pos,
_M_copy_from_string(__s, __position,
basic_string<_CharT, _Traits, _Alloc>::npos);
}
/**
* @brief Use a subset of a string.
* @param s A string of '0' and '1' characters.
* @param pos Index of the first character in @a s to use.
* @param position Index of the first character in @a s to use.
* @param n The number of characters to copy.
* @throw std::out_of_range If @a pos is bigger the size of @a s.
* @throw std::invalid_argument If a character appears in the string
@ -725,11 +725,11 @@ namespace std
*/
template<class _CharT, class _Traits, class _Alloc>
bitset(const basic_string<_CharT, _Traits, _Alloc>& __s,
size_t __pos, size_t __n) : _Base()
size_t __position, size_t __n) : _Base()
{
if (__pos > __s.size())
if (__position > __s.size())
__throw_out_of_range("bitset::bitset initial position not valid");
_M_copy_from_string(__s, __pos, __n);
_M_copy_from_string(__s, __position, __n);
}
// 23.3.5.2 bitset operations:
@ -765,16 +765,16 @@ namespace std
//@{
/**
* @brief Operations on bitsets.
* @param pos The number of places to shift.
* @param position The number of places to shift.
*
* These should be self-explanatory.
*/
bitset<_Nb>&
operator<<=(size_t __pos)
operator<<=(size_t __position)
{
if (__builtin_expect(__pos < _Nb, 1))
if (__builtin_expect(__position < _Nb, 1))
{
this->_M_do_left_shift(__pos);
this->_M_do_left_shift(__position);
this->_M_do_sanitize();
}
else
@ -783,11 +783,11 @@ namespace std
}
bitset<_Nb>&
operator>>=(size_t __pos)
operator>>=(size_t __position)
{
if (__builtin_expect(__pos < _Nb, 1))
if (__builtin_expect(__position < _Nb, 1))
{
this->_M_do_right_shift(__pos);
this->_M_do_right_shift(__position);
this->_M_do_sanitize();
}
else
@ -855,16 +855,16 @@ namespace std
/**
* @brief Sets a given bit to a particular value.
* @param pos The index of the bit.
* @param position The index of the bit.
* @param val Either true or false, defaults to true.
* @throw std::out_of_range If @a pos is bigger the size of the %set.
*/
bitset<_Nb>&
set(size_t __pos, bool __val = true)
set(size_t __position, bool __val = true)
{
if (__pos >= _Nb)
if (__position >= _Nb)
__throw_out_of_range(__N("bitset::set"));
return _Unchecked_set(__pos, __val);
return _Unchecked_set(__position, __val);
}
/**
@ -879,17 +879,17 @@ namespace std
/**
* @brief Sets a given bit to false.
* @param pos The index of the bit.
* @param position The index of the bit.
* @throw std::out_of_range If @a pos is bigger the size of the %set.
*
* Same as writing @c set(pos,false).
*/
bitset<_Nb>&
reset(size_t __pos)
reset(size_t __position)
{
if (__pos >= _Nb)
if (__position >= _Nb)
__throw_out_of_range(__N("bitset::reset"));
return _Unchecked_reset(__pos);
return _Unchecked_reset(__position);
}
/**
@ -905,15 +905,15 @@ namespace std
/**
* @brief Toggles a given bit to its opposite value.
* @param pos The index of the bit.
* @param position The index of the bit.
* @throw std::out_of_range If @a pos is bigger the size of the %set.
*/
bitset<_Nb>&
flip(size_t __pos)
flip(size_t __position)
{
if (__pos >= _Nb)
if (__position >= _Nb)
__throw_out_of_range(__N("bitset::flip"));
return _Unchecked_flip(__pos);
return _Unchecked_flip(__position);
}
/// See the no-argument flip().
@ -923,7 +923,7 @@ namespace std
//@{
/**
* @brief Array-indexing support.
* @param pos Index into the %bitset.
* @param position Index into the %bitset.
* @return A bool for a 'const %bitset'. For non-const bitsets, an
* instance of the reference proxy class.
* @note These operators do no range checking and throw no exceptions,
@ -938,10 +938,10 @@ namespace std
* @endif
*/
reference
operator[](size_t __pos) { return reference(*this,__pos); }
operator[](size_t __position) { return reference(*this,__position); }
bool
operator[](size_t __pos) const { return _Unchecked_test(__pos); }
operator[](size_t __position) const { return _Unchecked_test(__position); }
//@}
/**
@ -1007,16 +1007,16 @@ namespace std
/**
* @brief Tests the value of a bit.
* @param pos The index of a bit.
* @param position The index of a bit.
* @return The value at @a pos.
* @throw std::out_of_range If @a pos is bigger the size of the %set.
*/
bool
test(size_t __pos) const
test(size_t __position) const
{
if (__pos >= _Nb)
if (__position >= _Nb)
__throw_out_of_range(__N("bitset::test"));
return _Unchecked_test(__pos);
return _Unchecked_test(__position);
}
/**
@ -1036,12 +1036,12 @@ namespace std
//@{
/// Self-explanatory.
bitset<_Nb>
operator<<(size_t __pos) const
{ return bitset<_Nb>(*this) <<= __pos; }
operator<<(size_t __position) const
{ return bitset<_Nb>(*this) <<= __position; }
bitset<_Nb>
operator>>(size_t __pos) const
{ return bitset<_Nb>(*this) >>= __pos; }
operator>>(size_t __position) const
{ return bitset<_Nb>(*this) >>= __position; }
//@}
/**