Commit 08addde6 by Phil Edwards

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
parent e8face4c
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> 2003-06-10 Paolo Carlini <pcarlini@unitus.it>
* include/bits/fstream.tcc (overflow): According to * include/bits/fstream.tcc (overflow): According to
......
2000-03-24 libstdc++2.90.8 2003-04-26
- testsuite/27_io/istream_extractors_char.cc:
Failing on all platforms with -O2, working with -O. Need to look at this.
- _GLIBCPP_HAS_BUILTIN_SINF: We should still hold out for a cleaner solution the is currenly the case in bits/std_cmath.h. - _GLIBCPP_HAS_BUILTIN_SINF: We should still hold out for a cleaner solution the is currenly the case in bits/std_cmath.h.
......
Completion Checklist for the Standard C++ Library Completion Checklist for the Standard C++ Library
Updated: 1999-05-18 Updated: 2003-04-25
Status Code Legend: Status Code Legend:
M - Missing M - Missing
...@@ -17,10 +17,8 @@ ...@@ -17,10 +17,8 @@
issues appear [in brackets]. issues appear [in brackets].
Note that this checklist does not (yet) include all emendations Note that this checklist does not (yet) include all emendations
recommended by the ISO Library Working Group: (restricted site) recommended by the ISO Library Working Group:
http://www.cygnus.com/iso/wp/html/fdis/lwg-issues.html http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/lwg-toc.html
The LWG has announced its intention to release a public version
of the issues list, URL to be added here. XXX
Detailed explanation of status codes: Detailed explanation of status codes:
...@@ -36,7 +34,7 @@ ...@@ -36,7 +34,7 @@
It may have an incorrect base class, wrong namespace, wrong It may have an incorrect base class, wrong namespace, wrong
storage class, or simply not fully implement requirements. storage class, or simply not fully implement requirements.
However, it may be sufficiently usable to help test other However, it may be sufficiently usable to help test other
components. components.
T - Implemented, pending test/inspection: Implementation believed T - Implemented, pending test/inspection: Implementation believed
to be complete, and informal testing suggests it is ready for to be complete, and informal testing suggests it is ready for
...@@ -49,14 +47,14 @@ ...@@ -49,14 +47,14 @@
Inspected, "implementation-defined" documentation accepted, Inspected, "implementation-defined" documentation accepted,
local usability criteria satisfied, formally inspected for local usability criteria satisfied, formally inspected for
other untestable conformance. (Untestable requirements other untestable conformance. (Untestable requirements
include exception-safety, thread-safety, worst-case include exception-safety, thread-safety, worst-case
complexity, memory cleanliness, usefulness.) complexity, memory cleanliness, usefulness.)
P - Portability verified: Qualified on all primary target platforms. P - Portability verified: Qualified on all primary target platforms.
C - Certified: Formally certified to have passed all tests, C - Certified: Formally certified to have passed all tests,
inspections, qualifications; approved under "signing authority" 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> <algorithm> <iomanip> <list> <ostream> <streambuf>
...@@ -89,11 +87,11 @@ X wctrans_t, wctype_t, and wint_t. ...@@ -89,11 +87,11 @@ X wctrans_t, wctype_t, and wint_t.
subroutines is implementation-defined. subroutines is implementation-defined.
18.1 Types [lib.support.types] 18.1 Types [lib.support.types]
X <cstddef> X <cstddef>
X NULL X NULL
X offsetof X offsetof
X ptrdiff_t X ptrdiff_t
X size_t X size_t
18.2 Implementation properties [lib.support.limits] 18.2 Implementation properties [lib.support.limits]
...@@ -101,9 +99,6 @@ X size_t ...@@ -101,9 +99,6 @@ X size_t
18.2.1 Numeric limits [lib.limits] 18.2.1 Numeric limits [lib.limits]
[Note: the numeric_limits templates are now automatically
generated. ]
X template<class T> class numeric_limits; X template<class T> class numeric_limits;
T enum float_round_style; T enum float_round_style;
...@@ -192,7 +187,7 @@ T denorm present = 1; ...@@ -192,7 +187,7 @@ T denorm present = 1;
1 Header <climits> (Table 3): 1 Header <climits> (Table 3):
CHAR_BIT INT_MAX LONG_MIN SCHAR_MIN UCHAR_MAX USHRT_MAX 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 CHAR_MIN LONG_MAX SCHAR_MAX SHRT_MIN ULONG_MAX
3 Header <cfloat> (Table 4): 3 Header <cfloat> (Table 4):
...@@ -457,7 +452,7 @@ X |Macros: EDOM ERANGE errno | ...@@ -457,7 +452,7 @@ X |Macros: EDOM ERANGE errno |
Header <utility> synopsis Header <utility> synopsis
// _lib.operators_, operators: // _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&); 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 ...@@ -2280,7 +2275,7 @@ X Functions: localeconv setlocale
Header <deque> synopsis 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> T template <class T, class Allocator>
bool operator==(const deque<T,Allocator>& x, const deque<T,Allocator>& y); bool operator==(const deque<T,Allocator>& x, const deque<T,Allocator>& y);
T template <class T, class Allocator> T template <class T, class Allocator>
...@@ -2299,7 +2294,7 @@ T template <class T, class Allocator> ...@@ -2299,7 +2294,7 @@ T template <class T, class Allocator>
Header <list> synopsis 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> T template <class T, class Allocator>
bool operator==(const list<T,Allocator>& x, const list<T,Allocator>& y); bool operator==(const list<T,Allocator>& x, const list<T,Allocator>& y);
T template <class T, class Allocator> T template <class T, class Allocator>
...@@ -2319,7 +2314,7 @@ T template <class T, class Allocator> ...@@ -2319,7 +2314,7 @@ T template <class T, class Allocator>
Header <queue> synopsis Header <queue> synopsis
namespace std { 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> T template <class T, class Container>
bool operator==(const queue<T, Container>& x, bool operator==(const queue<T, Container>& x,
const queue<T, Container>& y); const queue<T, Container>& y);
...@@ -2418,13 +2413,13 @@ T template <class Allocator> ...@@ -2418,13 +2413,13 @@ T template <class Allocator>
23.2.1 Template class deque [lib.deque] 23.2.1 Template class deque [lib.deque]
template <class T, class Allocator = allocator<T> > template <class T, class Allocator = allocator<T> >
X class deque { T class deque {
public: public:
// types: // types:
T typedef typename Allocator::reference reference; T typedef typename Allocator::reference reference;
T typedef typename Allocator::const_reference const_reference; T typedef typename Allocator::const_reference const_reference;
X typedef implementation defined iterator; T typedef implementation defined iterator;
X typedef implementation defined const_iterator; T typedef implementation defined const_iterator;
T typedef implementation defined size_type; T typedef implementation defined size_type;
T typedef implementation defined difference_type; T typedef implementation defined difference_type;
T typedef T value_type; T typedef T value_type;
...@@ -2511,14 +2506,14 @@ T template <class T, class Allocator> ...@@ -2511,14 +2506,14 @@ T template <class T, class Allocator>
23.2.2 Template class list [lib.list] 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 { class list {
public: public:
// types: // types:
T typedef typename Allocator::reference reference; T typedef typename Allocator::reference reference;
T typedef typename Allocator::const_reference const_reference; T typedef typename Allocator::const_reference const_reference;
X typedef implementation defined iterator; T typedef implementation defined iterator;
X typedef implementation defined const_iterator; T typedef implementation defined const_iterator;
T typedef implementation defined size_type; T typedef implementation defined size_type;
T typedef implementation defined difference_type; T typedef implementation defined difference_type;
T typedef T value_type; T typedef T value_type;
...@@ -2720,13 +2715,13 @@ T template <class T, class Container> ...@@ -2720,13 +2715,13 @@ T template <class T, class Container>
23.2.4 Template class vector [lib.vector] 23.2.4 Template class vector [lib.vector]
template <class T, class Allocator = allocator<T> > template <class T, class Allocator = allocator<T> >
X class vector { T class vector {
public: public:
// types: // types:
T typedef typename Allocator::reference reference; T typedef typename Allocator::reference reference;
T typedef typename Allocator::const_reference const_reference; T typedef typename Allocator::const_reference const_reference;
X typedef implementation defined iterator; T typedef implementation defined iterator;
X typedef implementation defined const_iterator; T typedef implementation defined const_iterator;
T typedef implementation defined size_type; T typedef implementation defined size_type;
T typedef implementation defined difference_type; T typedef implementation defined difference_type;
T typedef T value_type; T typedef T value_type;
...@@ -2814,12 +2809,12 @@ T template <class T, class Allocator> ...@@ -2814,12 +2809,12 @@ T template <class T, class Allocator>
23.2.5 Class vector<bool> [lib.vector.bool] 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: public:
// types: // types:
T typedef bool const_reference; T typedef bool const_reference;
X typedef implementation defined iterator; T typedef implementation defined iterator;
X typedef implementation defined const_iterator; T typedef implementation defined const_iterator;
T typedef implementation defined size_type; T typedef implementation defined size_type;
T typedef implementation defined difference_type; T typedef implementation defined difference_type;
T typedef bool value_type; T typedef bool value_type;
...@@ -2925,7 +2920,7 @@ T template <class Allocator> ...@@ -2925,7 +2920,7 @@ T template <class Allocator>
template <class Key, class T, class Compare = less<Key>, template <class Key, class T, class Compare = less<Key>,
class Allocator = allocator<pair<const Key, T> > > class Allocator = allocator<pair<const Key, T> > >
X class map; T class map;
T template <class Key, class T, class Compare, class Allocator> T template <class Key, class T, class Compare, class Allocator>
bool operator==(const map<Key,T,Compare,Allocator>& x, bool operator==(const map<Key,T,Compare,Allocator>& x,
...@@ -2978,7 +2973,7 @@ T template <class Key, class T, class Compare, class Allocator> ...@@ -2978,7 +2973,7 @@ T template <class Key, class T, class Compare, class Allocator>
template <class Key, class Compare = less<Key>, template <class Key, class Compare = less<Key>,
class Allocator = allocator<Key> > class Allocator = allocator<Key> >
X class set; T class set;
T template <class Key, class Compare, class Allocator> T template <class Key, class Compare, class Allocator>
bool operator==(const set<Key,Compare,Allocator>& x, bool operator==(const set<Key,Compare,Allocator>& x,
...@@ -3031,7 +3026,7 @@ T template <class Key, class Compare, class Allocator> ...@@ -3031,7 +3026,7 @@ T template <class Key, class Compare, class Allocator>
template <class Key, class T, class Compare = less<Key>, template <class Key, class T, class Compare = less<Key>,
class Allocator = allocator<pair<const Key, T> > > class Allocator = allocator<pair<const Key, T> > >
X class map { T class map {
public: public:
// types: // types:
T typedef Key key_type; T typedef Key key_type;
...@@ -3041,8 +3036,8 @@ T typedef Compare key_compare; ...@@ -3041,8 +3036,8 @@ T typedef Compare key_compare;
T typedef Allocator allocator_type; T typedef Allocator allocator_type;
T typedef typename Allocator::reference reference; T typedef typename Allocator::reference reference;
T typedef typename Allocator::const_reference const_reference; T typedef typename Allocator::const_reference const_reference;
X typedef implementation defined iterator; T typedef implementation defined iterator;
X typedef implementation defined const_iterator; T typedef implementation defined const_iterator;
T typedef implementation defined size_type; T typedef implementation defined size_type;
T typedef implementation defined difference_type; T typedef implementation defined difference_type;
T typedef typename Allocator::pointer pointer; T typedef typename Allocator::pointer pointer;
...@@ -3140,7 +3135,7 @@ T template <class Key, class T, class Compare, class Allocator> ...@@ -3140,7 +3135,7 @@ T template <class Key, class T, class Compare, class Allocator>
template <class Key, class T, class Compare = less<Key>, template <class Key, class T, class Compare = less<Key>,
class Allocator = allocator<pair<const Key, T> > > class Allocator = allocator<pair<const Key, T> > >
X class multimap { T class multimap {
public: public:
// types: // types:
T typedef Key key_type; T typedef Key key_type;
...@@ -3150,8 +3145,8 @@ T typedef Compare key_compare; ...@@ -3150,8 +3145,8 @@ T typedef Compare key_compare;
T typedef Allocator allocator_type; T typedef Allocator allocator_type;
T typedef typename Allocator::reference reference; T typedef typename Allocator::reference reference;
T typedef typename Allocator::const_reference const_reference; T typedef typename Allocator::const_reference const_reference;
X typedef implementation defined iterator; T typedef implementation defined iterator;
X typedef implementation defined const_iterator; T typedef implementation defined const_iterator;
T typedef implementation defined size_type; T typedef implementation defined size_type;
T typedef implementation defined difference_type T typedef implementation defined difference_type
T typedef typename Allocator::pointer pointer; T typedef typename Allocator::pointer pointer;
...@@ -3248,7 +3243,7 @@ T template <class Key, class T, class Compare, class Allocator> ...@@ -3248,7 +3243,7 @@ T template <class Key, class T, class Compare, class Allocator>
template <class Key, class Compare = less<Key>, template <class Key, class Compare = less<Key>,
class Allocator = allocator<Key> > class Allocator = allocator<Key> >
X class set { T class set {
public: public:
// types: // types:
T typedef Key key_type; T typedef Key key_type;
...@@ -3258,8 +3253,8 @@ T typedef Compare value_compare; ...@@ -3258,8 +3253,8 @@ T typedef Compare value_compare;
T typedef Allocator allocator_type; T typedef Allocator allocator_type;
T typedef typename Allocator::reference reference; T typedef typename Allocator::reference reference;
T typedef typename Allocator::const_reference const_reference; T typedef typename Allocator::const_reference const_reference;
X typedef implementation defined iterator; T typedef implementation defined iterator;
X typedef implementation defined const_iterator; T typedef implementation defined const_iterator;
T typedef implementation defined size_type; T typedef implementation defined size_type;
T typedef implementation defined difference_type; T typedef implementation defined difference_type;
T typedef typename Allocator::pointer pointer; T typedef typename Allocator::pointer pointer;
...@@ -3338,7 +3333,7 @@ T template <class Key, class Compare, class Allocator> ...@@ -3338,7 +3333,7 @@ T template <class Key, class Compare, class Allocator>
template <class Key, class Compare = less<Key>, template <class Key, class Compare = less<Key>,
class Allocator = allocator<Key> > class Allocator = allocator<Key> >
X class multiset { T class multiset {
public: public:
// types: // types:
T typedef Key key_type; T typedef Key key_type;
...@@ -3348,8 +3343,8 @@ T typedef Compare value_compare; ...@@ -3348,8 +3343,8 @@ T typedef Compare value_compare;
T typedef Allocator allocator_type; T typedef Allocator allocator_type;
T typedef typename Allocator::reference reference; T typedef typename Allocator::reference reference;
T typedef typename Allocator::const_reference const_reference; T typedef typename Allocator::const_reference const_reference;
X typedef implementation defined iterator; T typedef implementation defined iterator;
X typedef implementation defined const_iterator; T typedef implementation defined const_iterator;
T typedef implementation defined size_type; T typedef implementation defined size_type;
T typedef implementation defined difference_type T typedef implementation defined difference_type
T typedef typename Allocator::pointer pointer; T typedef typename Allocator::pointer pointer;
...@@ -3430,14 +3425,7 @@ T template <class Key, class Compare, class Allocator> ...@@ -3430,14 +3425,7 @@ T template <class Key, class Compare, class Allocator>
Header <bitset> synopsis Header <bitset> synopsis
[What's this stuff? T template <size_t N> class bitset;
#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;
// _lib.bitset.operators_ bitset operations: // _lib.bitset.operators_ bitset operations:
T template <size_t N> T template <size_t N>
bitset<N> operator&(const bitset<N>&, const bitset<N>&); bitset<N> operator&(const bitset<N>&, const bitset<N>&);
...@@ -3452,7 +3440,7 @@ T template <class charT, class traits, size_t N> ...@@ -3452,7 +3440,7 @@ T template <class charT, class traits, size_t N>
basic_ostream<charT, traits>& basic_ostream<charT, traits>&
operator<<(basic_ostream<charT, traits>& os, const bitset<N>& x); 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: public:
// bit reference: // bit reference:
T class reference { T class reference {
......
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
<li><a href="#2"><code>auto_ptr</code> inside container classes</a></li> <li><a href="#2"><code>auto_ptr</code> inside container classes</a></li>
<li><a href="#3">Functors</a></li> <li><a href="#3">Functors</a></li>
<li><a href="#4">Pairs</a></li> <li><a href="#4">Pairs</a></li>
<li><a href="#5">Memory allocators</a></li>
</ul> </ul>
<hr /> <hr />
...@@ -207,7 +208,14 @@ ...@@ -207,7 +208,14 @@
<a href="../faq/index.html">to the FAQ</a>. <a href="../faq/index.html">to the FAQ</a>.
</p> </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>
<!-- ####################################################### --> <!-- ####################################################### -->
......
...@@ -143,6 +143,7 @@ ...@@ -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#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#3">Functors</a></li>
<li><a href="20_util/howto.html#4">Pairs</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> </ul>
</li> </li>
...@@ -222,8 +223,8 @@ ...@@ -222,8 +223,8 @@
<ul> <ul>
<li><a href="ext/howto.html#1">Ropes and trees and hashes, oh my!</a></li> <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#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#3">Allocators (versions 3.0, 3.1, 3.2, 3.3)</a></li>
<li><a href="ext/howto.html#6">Allocators (version 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#4">Compile-time checks</a></li>
<li><a href="ext/howto.html#5">LWG Issues</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> <li><a href="ext/../18_support/howto.html#5">Demangling</a></li>
......
...@@ -41,8 +41,8 @@ ...@@ -41,8 +41,8 @@
<ul> <ul>
<li><a href="#1">Ropes and trees and hashes, oh my!</a></li> <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="#2">Added members and types</a></li>
<li><a href="#3">Allocators (versions 3.0, 3.1, 3.2)</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.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="#4">Compile-time checks</a></li>
<li><a href="#5">LWG Issues</a></li> <li><a href="#5">LWG Issues</a></li>
<li><a href="../18_support/howto.html#5">Demangling</a></li> <li><a href="../18_support/howto.html#5">Demangling</a></li>
...@@ -134,7 +134,7 @@ ...@@ -134,7 +134,7 @@
</p> </p>
<hr /> <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 <p>Thread-safety, space efficiency, high speed, portability... this is a
mess. Where to begin? mess. Where to begin?
</p> </p>
...@@ -361,9 +361,14 @@ ...@@ -361,9 +361,14 @@
</p> </p>
<hr /> <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>Changes are coming...
</p> </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 <p>Return <a href="#top">to top of page</a> or
<a href="../faq/index.html">to the FAQ</a>. <a href="../faq/index.html">to the FAQ</a>.
</p> </p>
......
...@@ -661,43 +661,43 @@ namespace std ...@@ -661,43 +661,43 @@ namespace std
// _S_construct_aux is used to implement the 21.3.1 para 15 which // _S_construct_aux is used to implement the 21.3.1 para 15 which
// requires special behaviour if _InIter is an integral type // requires special behaviour if _InIter is an integral type
template<class _InIter> template<class _InIterator>
static _CharT* static _CharT*
_S_construct_aux(_InIter __beg, _InIter __end, const _Alloc& __a, _S_construct_aux(_InIterator __beg, _InIterator __end, const _Alloc& __a,
__false_type) __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()); return _S_construct(__beg, __end, __a, _Tag());
} }
template<class _InIter> template<class _InIterator>
static _CharT* static _CharT*
_S_construct_aux(_InIter __beg, _InIter __end, const _Alloc& __a, _S_construct_aux(_InIterator __beg, _InIterator __end, const _Alloc& __a,
__true_type) __true_type)
{ {
return _S_construct(static_cast<size_type>(__beg), return _S_construct(static_cast<size_type>(__beg),
static_cast<value_type>(__end), __a); static_cast<value_type>(__end), __a);
} }
template<class _InIter> template<class _InIterator>
static _CharT* 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()); return _S_construct_aux(__beg, __end, __a, _Integral());
} }
// For Input Iterators, used in istreambuf_iterators, etc. // For Input Iterators, used in istreambuf_iterators, etc.
template<class _InIter> template<class _InIterator>
static _CharT* static _CharT*
_S_construct(_InIter __beg, _InIter __end, const _Alloc& __a, _S_construct(_InIterator __beg, _InIterator __end, const _Alloc& __a,
input_iterator_tag); input_iterator_tag);
// For forward_iterators up to random_access_iterators, used for // For forward_iterators up to random_access_iterators, used for
// string::iterator, _CharT*, etc. // string::iterator, _CharT*, etc.
template<class _FwdIter> template<class _FwdIterator>
static _CharT* static _CharT*
_S_construct(_FwdIter __beg, _FwdIter __end, const _Alloc& __a, _S_construct(_FwdIterator __beg, _FwdIterator __end, const _Alloc& __a,
forward_iterator_tag); forward_iterator_tag);
static _CharT* static _CharT*
......
...@@ -71,10 +71,10 @@ namespace std ...@@ -71,10 +71,10 @@ namespace std
// Input Iterators have a cost structure very different from // Input Iterators have a cost structure very different from
// pointers, calling for a different coding style. // pointers, calling for a different coding style.
template<typename _CharT, typename _Traits, typename _Alloc> template<typename _CharT, typename _Traits, typename _Alloc>
template<typename _InIter> template<typename _InIterator>
_CharT* _CharT*
basic_string<_CharT, _Traits, _Alloc>:: 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) input_iterator_tag)
{ {
if (__beg == __end && __a == _Alloc()) if (__beg == __end && __a == _Alloc())
...@@ -131,17 +131,17 @@ namespace std ...@@ -131,17 +131,17 @@ namespace std
} }
template<typename _CharT, typename _Traits, typename _Alloc> template<typename _CharT, typename _Traits, typename _Alloc>
template <class _InIter> template <class _InIterator>
_CharT* _CharT*
basic_string<_CharT, _Traits, _Alloc>:: 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) forward_iterator_tag)
{ {
if (__beg == __end && __a == _Alloc()) if (__beg == __end && __a == _Alloc())
return _S_empty_rep()._M_refcopy(); return _S_empty_rep()._M_refcopy();
// NB: Not required, but considered best practice. // 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"); __throw_logic_error("basic_string::_S_construct NULL not valid");
const size_type __dnew = static_cast<size_type>(std::distance(__beg, __end)); const size_type __dnew = static_cast<size_type>(std::distance(__beg, __end));
...@@ -234,9 +234,9 @@ namespace std ...@@ -234,9 +234,9 @@ namespace std
{ } { }
template<typename _CharT, typename _Traits, typename _Alloc> template<typename _CharT, typename _Traits, typename _Alloc>
template<typename _InputIter> template<typename _InputIterator>
basic_string<_CharT, _Traits, _Alloc>:: 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) : _M_dataplus(_S_construct(__beg, __end, __a), __a)
{ } { }
...@@ -613,11 +613,11 @@ namespace std ...@@ -613,11 +613,11 @@ namespace std
// for input iterators and reverse iterators. It buffers internally and then // for input iterators and reverse iterators. It buffers internally and then
// calls _M_replace_safe. // calls _M_replace_safe.
template<typename _CharT, typename _Traits, typename _Alloc> template<typename _CharT, typename _Traits, typename _Alloc>
template<typename _InputIter> template<typename _InputIterator>
basic_string<_CharT, _Traits, _Alloc>& basic_string<_CharT, _Traits, _Alloc>&
basic_string<_CharT, _Traits, _Alloc>:: basic_string<_CharT, _Traits, _Alloc>::
_M_replace(iterator __i1, iterator __i2, _InputIter __k1, _M_replace(iterator __i1, iterator __i2, _InputIterator __k1,
_InputIter __k2, input_iterator_tag) _InputIterator __k2, input_iterator_tag)
{ {
// Save concerned source string data in a temporary. // Save concerned source string data in a temporary.
const basic_string __s(__k1, __k2); const basic_string __s(__k1, __k2);
...@@ -628,11 +628,11 @@ namespace std ...@@ -628,11 +628,11 @@ namespace std
// and can be used in "safe" situations involving forward iterators, // and can be used in "safe" situations involving forward iterators,
// i.e., when source and destination ranges are known to not overlap. // i.e., when source and destination ranges are known to not overlap.
template<typename _CharT, typename _Traits, typename _Alloc> template<typename _CharT, typename _Traits, typename _Alloc>
template<typename _ForwardIter> template<typename _ForwardIterator>
basic_string<_CharT, _Traits, _Alloc>& basic_string<_CharT, _Traits, _Alloc>&
basic_string<_CharT, _Traits, _Alloc>:: basic_string<_CharT, _Traits, _Alloc>::
_M_replace_safe(iterator __i1, iterator __i2, _ForwardIter __k1, _M_replace_safe(iterator __i1, iterator __i2, _ForwardIterator __k1,
_ForwardIter __k2) _ForwardIterator __k2)
{ {
const size_type __dnew = static_cast<size_type>(std::distance(__k1, __k2)); const size_type __dnew = static_cast<size_type>(std::distance(__k1, __k2));
const size_type __dold = __i2 - __i1; const size_type __dold = __i2 - __i1;
......
...@@ -186,10 +186,10 @@ namespace std ...@@ -186,10 +186,10 @@ namespace std
} }
template <typename _Tp, class _Alloc> template <typename _Tp, class _Alloc>
template <typename _InputIter> template <typename _InputIterator>
void void
deque<_Tp,_Alloc> 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(); iterator __cur = begin();
for ( ; __first != __last && __cur != end(); ++__cur, ++__first) for ( ; __first != __last && __cur != end(); ++__cur, ++__first)
...@@ -710,4 +710,3 @@ namespace std ...@@ -710,4 +710,3 @@ namespace std
} // namespace std } // namespace std
#endif /* __GLIBCPP_INTERNAL_DEQUE_TCC */ #endif /* __GLIBCPP_INTERNAL_DEQUE_TCC */
...@@ -160,10 +160,10 @@ namespace std ...@@ -160,10 +160,10 @@ namespace std
} }
template<typename _Tp, typename _Alloc> template<typename _Tp, typename _Alloc>
template <typename _InputIter> template <typename _InputIterator>
void void
list<_Tp,_Alloc>:: 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 __first1 = begin();
iterator __last1 = end(); iterator __last1 = end();
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -86,16 +86,16 @@ namespace std ...@@ -86,16 +86,16 @@ namespace std
* This function swaps the values pointed to by two iterators, not the * This function swaps the values pointed to by two iterators, not the
* iterators themselves. * iterators themselves.
*/ */
template<typename _ForwardIter1, typename _ForwardIter2> template<typename _ForwardIterator1, typename _ForwardIterator2>
inline void 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<_ForwardIterator1>::value_type _ValueType1;
typedef typename iterator_traits<_ForwardIter2>::value_type _ValueType2; typedef typename iterator_traits<_ForwardIterator2>::value_type _ValueType2;
// concept requirements // concept requirements
__glibcpp_function_requires(_Mutable_ForwardIteratorConcept<_ForwardIter1>) __glibcpp_function_requires(_Mutable_ForwardIteratorConcept<_ForwardIterator1>)
__glibcpp_function_requires(_Mutable_ForwardIteratorConcept<_ForwardIter2>) __glibcpp_function_requires(_Mutable_ForwardIteratorConcept<_ForwardIterator2>)
__glibcpp_function_requires(_ConvertibleConcept<_ValueType1, _ValueType2>) __glibcpp_function_requires(_ConvertibleConcept<_ValueType1, _ValueType2>)
__glibcpp_function_requires(_ConvertibleConcept<_ValueType2, _ValueType1>) __glibcpp_function_requires(_ConvertibleConcept<_ValueType2, _ValueType1>)
...@@ -210,22 +210,22 @@ namespace std ...@@ -210,22 +210,22 @@ namespace std
// (2) If we're using random access iterators, then write the loop as // (2) If we're using random access iterators, then write the loop as
// a for loop with an explicit count. // a for loop with an explicit count.
template<typename _InputIter, typename _OutputIter> template<typename _InputIterator, typename _OutputIterator>
inline _OutputIter inline _OutputIterator
__copy(_InputIter __first, _InputIter __last, __copy(_InputIterator __first, _InputIterator __last,
_OutputIter __result, input_iterator_tag) _OutputIterator __result, input_iterator_tag)
{ {
for (; __first != __last; ++__result, ++__first) for (; __first != __last; ++__result, ++__first)
*__result = *__first; *__result = *__first;
return __result; return __result;
} }
template<typename _RandomAccessIter, typename _OutputIter> template<typename _RandomAccessIterator, typename _OutputIterator>
inline _OutputIter inline _OutputIterator
__copy(_RandomAccessIter __first, _RandomAccessIter __last, __copy(_RandomAccessIterator __first, _RandomAccessIterator __last,
_OutputIter __result, random_access_iterator_tag) _OutputIterator __result, random_access_iterator_tag)
{ {
typedef typename iterator_traits<_RandomAccessIter>::difference_type typedef typename iterator_traits<_RandomAccessIterator>::difference_type
_Distance; _Distance;
for (_Distance __n = __last - __first; __n > 0; --__n) for (_Distance __n = __last - __first; __n > 0; --__n)
{ {
...@@ -244,16 +244,16 @@ namespace std ...@@ -244,16 +244,16 @@ namespace std
return __result + (__last - __first); return __result + (__last - __first);
} }
template<typename _InputIter, typename _OutputIter> template<typename _InputIterator, typename _OutputIterator>
inline _OutputIter inline _OutputIterator
__copy_aux2(_InputIter __first, _InputIter __last, _OutputIter __result, __copy_aux2(_InputIterator __first, _InputIterator __last,
__false_type) _OutputIterator __result, __false_type)
{ return __copy(__first, __last, __result, __iterator_category(__first)); } { return __copy(__first, __last, __result, __iterator_category(__first)); }
template<typename _InputIter, typename _OutputIter> template<typename _InputIterator, typename _OutputIterator>
inline _OutputIter inline _OutputIterator
__copy_aux2(_InputIter __first, _InputIter __last, _OutputIter __result, __copy_aux2(_InputIterator __first, _InputIterator __last,
__true_type) _OutputIterator __result, __true_type)
{ return __copy(__first, __last, __result, __iterator_category(__first)); } { return __copy(__first, __last, __result, __iterator_category(__first)); }
template<typename _Tp> template<typename _Tp>
...@@ -267,45 +267,45 @@ namespace std ...@@ -267,45 +267,45 @@ namespace std
__true_type) __true_type)
{ return __copy_trivial(__first, __last, __result); } { return __copy_trivial(__first, __last, __result); }
template<typename _InputIter, typename _OutputIter> template<typename _InputIterator, typename _OutputIterator>
inline _OutputIter inline _OutputIterator
__copy_ni2(_InputIter __first, _InputIter __last, _OutputIter __result, __copy_ni2(_InputIterator __first, _InputIterator __last,
__true_type) _OutputIterator __result, __true_type)
{ {
typedef typename iterator_traits<_InputIter>::value_type typedef typename iterator_traits<_InputIterator>::value_type
_ValueType; _ValueType;
typedef typename __type_traits<_ValueType>::has_trivial_assignment_operator typedef typename __type_traits<_ValueType>::has_trivial_assignment_operator
_Trivial; _Trivial;
return _OutputIter(__copy_aux2(__first, __last, __result.base(), return _OutputIterator(__copy_aux2(__first, __last, __result.base(),
_Trivial())); _Trivial()));
} }
template<typename _InputIter, typename _OutputIter> template<typename _InputIterator, typename _OutputIterator>
inline _OutputIter inline _OutputIterator
__copy_ni2(_InputIter __first, _InputIter __last, _OutputIter __result, __copy_ni2(_InputIterator __first, _InputIterator __last,
__false_type) _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 typedef typename __type_traits<_ValueType>::has_trivial_assignment_operator
_Trivial; _Trivial;
return __copy_aux2(__first, __last, __result, _Trivial()); return __copy_aux2(__first, __last, __result, _Trivial());
} }
template<typename _InputIter, typename _OutputIter> template<typename _InputIterator, typename _OutputIterator>
inline _OutputIter inline _OutputIterator
__copy_ni1(_InputIter __first, _InputIter __last, _OutputIter __result, __copy_ni1(_InputIterator __first, _InputIterator __last,
__true_type) _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()); return __copy_ni2(__first.base(), __last.base(), __result, __Normal());
} }
template<typename _InputIter, typename _OutputIter> template<typename _InputIterator, typename _OutputIterator>
inline _OutputIter inline _OutputIterator
__copy_ni1(_InputIter __first, _InputIter __last, _OutputIter __result, __copy_ni1(_InputIterator __first, _InputIterator __last,
__false_type) _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()); return __copy_ni2(__first, __last, __result, __Normal());
} }
...@@ -322,35 +322,35 @@ namespace std ...@@ -322,35 +322,35 @@ namespace std
* optimizations such as unrolling). If the input range and the output * optimizations such as unrolling). If the input range and the output
* range overlap, then the copy_backward function should be used instead. * range overlap, then the copy_backward function should be used instead.
*/ */
template<typename _InputIter, typename _OutputIter> template<typename _InputIterator, typename _OutputIterator>
inline _OutputIter inline _OutputIterator
copy(_InputIter __first, _InputIter __last, _OutputIter __result) copy(_InputIterator __first, _InputIterator __last, _OutputIterator __result)
{ {
// concept requirements // concept requirements
__glibcpp_function_requires(_InputIteratorConcept<_InputIter>) __glibcpp_function_requires(_InputIteratorConcept<_InputIterator>)
__glibcpp_function_requires(_OutputIteratorConcept<_OutputIter, __glibcpp_function_requires(_OutputIteratorConcept<_OutputIterator,
typename iterator_traits<_InputIter>::value_type>) 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()); return __copy_ni1(__first, __last, __result, __Normal());
} }
template<typename _BidirectionalIter1, typename _BidirectionalIter2> template<typename _BidirectionalIterator1, typename _BidirectionalIterator2>
inline _BidirectionalIter2 inline _BidirectionalIterator2
__copy_backward(_BidirectionalIter1 __first, _BidirectionalIter1 __last, __copy_backward(_BidirectionalIterator1 __first, _BidirectionalIterator1 __last,
_BidirectionalIter2 __result, bidirectional_iterator_tag) _BidirectionalIterator2 __result, bidirectional_iterator_tag)
{ {
while (__first != __last) while (__first != __last)
*--__result = *--__last; *--__result = *--__last;
return __result; return __result;
} }
template<typename _RandomAccessIter, typename _BidirectionalIter> template<typename _RandomAccessIterator, typename _BidirectionalIterator>
inline _BidirectionalIter inline _BidirectionalIterator
__copy_backward(_RandomAccessIter __first, _RandomAccessIter __last, __copy_backward(_RandomAccessIterator __first, _RandomAccessIterator __last,
_BidirectionalIter __result, random_access_iterator_tag) _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) for (__n = __last - __first; __n > 0; --__n)
*--__result = *--__last; *--__result = *--__last;
return __result; return __result;
...@@ -361,13 +361,13 @@ namespace std ...@@ -361,13 +361,13 @@ namespace std
// have partial ordering of function templates. All we're doing is // have partial ordering of function templates. All we're doing is
// creating a specialization so that we can turn a call to copy_backward // creating a specialization so that we can turn a call to copy_backward
// into a memmove whenever possible. // into a memmove whenever possible.
template<typename _BidirectionalIter1, typename _BidirectionalIter2, template<typename _BidirectionalIterator1, typename _BidirectionalIterator2,
typename _BoolType> typename _BoolType>
struct __copy_backward_dispatch struct __copy_backward_dispatch
{ {
static _BidirectionalIter2 static _BidirectionalIterator2
copy(_BidirectionalIter1 __first, _BidirectionalIter1 __last, copy(_BidirectionalIterator1 __first, _BidirectionalIterator1 __last,
_BidirectionalIter2 __result) _BidirectionalIterator2 __result)
{ {
return __copy_backward(__first, __last, __result, return __copy_backward(__first, __last, __result,
__iterator_category(__first)); __iterator_category(__first));
...@@ -483,12 +483,12 @@ namespace std ...@@ -483,12 +483,12 @@ namespace std
* types filling contiguous areas of memory, this becomes an inline call to * types filling contiguous areas of memory, this becomes an inline call to
* @c memset. * @c memset.
*/ */
template<typename _ForwardIter, typename _Tp> template<typename _ForwardIterator, typename _Tp>
void void
fill(_ForwardIter __first, _ForwardIter __last, const _Tp& __value) fill(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value)
{ {
// concept requirements // concept requirements
__glibcpp_function_requires(_Mutable_ForwardIteratorConcept<_ForwardIter>) __glibcpp_function_requires(_Mutable_ForwardIteratorConcept<_ForwardIterator>)
for ( ; __first != __last; ++__first) for ( ; __first != __last; ++__first)
*__first = __value; *__first = __value;
...@@ -505,12 +505,12 @@ namespace std ...@@ -505,12 +505,12 @@ namespace std
* types filling contiguous areas of memory, this becomes an inline call to * types filling contiguous areas of memory, this becomes an inline call to
* @c memset. * @c memset.
*/ */
template<typename _OutputIter, typename _Size, typename _Tp> template<typename _OutputIterator, typename _Size, typename _Tp>
_OutputIter _OutputIterator
fill_n(_OutputIter __first, _Size __n, const _Tp& __value) fill_n(_OutputIterator __first, _Size __n, const _Tp& __value)
{ {
// concept requirements // concept requirements
__glibcpp_function_requires(_OutputIteratorConcept<_OutputIter,_Tp>) __glibcpp_function_requires(_OutputIteratorConcept<_OutputIterator,_Tp>)
for ( ; __n > 0; --__n, ++__first) for ( ; __n > 0; --__n, ++__first)
*__first = __value; *__first = __value;
...@@ -576,24 +576,25 @@ namespace std ...@@ -576,24 +576,25 @@ namespace std
* second iterator points into the second range, and the elements pointed * second iterator points into the second range, and the elements pointed
* to by the iterators are not equal. * to by the iterators are not equal.
*/ */
template<typename _InputIter1, typename _InputIter2> template<typename _InputIterator1, typename _InputIterator2>
pair<_InputIter1, _InputIter2> pair<_InputIterator1, _InputIterator2>
mismatch(_InputIter1 __first1, _InputIter1 __last1, _InputIter2 __first2) mismatch(_InputIterator1 __first1, _InputIterator1 __last1,
_InputIterator2 __first2)
{ {
// concept requirements // concept requirements
__glibcpp_function_requires(_InputIteratorConcept<_InputIter1>) __glibcpp_function_requires(_InputIteratorConcept<_InputIterator1>)
__glibcpp_function_requires(_InputIteratorConcept<_InputIter2>) __glibcpp_function_requires(_InputIteratorConcept<_InputIterator2>)
__glibcpp_function_requires(_EqualityComparableConcept< __glibcpp_function_requires(_EqualityComparableConcept<
typename iterator_traits<_InputIter1>::value_type>) typename iterator_traits<_InputIterator1>::value_type>)
__glibcpp_function_requires(_EqualityComparableConcept< __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; ++__first1;
++__first2; ++__first2;
} }
return pair<_InputIter1, _InputIter2>(__first1, __first2); return pair<_InputIterator1, _InputIterator2>(__first1, __first2);
} }
/** /**
...@@ -610,21 +611,21 @@ namespace std ...@@ -610,21 +611,21 @@ namespace std
* second iterator points into the second range, and the elements pointed * second iterator points into the second range, and the elements pointed
* to by the iterators are not equal. * to by the iterators are not equal.
*/ */
template<typename _InputIter1, typename _InputIter2, typename _BinaryPredicate> template<typename _InputIterator1, typename _InputIterator2, typename _BinaryPredicate>
pair<_InputIter1, _InputIter2> pair<_InputIterator1, _InputIterator2>
mismatch(_InputIter1 __first1, _InputIter1 __last1, _InputIter2 __first2, mismatch(_InputIterator1 __first1, _InputIterator1 __last1,
_BinaryPredicate __binary_pred) _InputIterator2 __first2, _BinaryPredicate __binary_pred)
{ {
// concept requirements // concept requirements
__glibcpp_function_requires(_InputIteratorConcept<_InputIter1>) __glibcpp_function_requires(_InputIteratorConcept<_InputIterator1>)
__glibcpp_function_requires(_InputIteratorConcept<_InputIter2>) __glibcpp_function_requires(_InputIteratorConcept<_InputIterator2>)
while (__first1 != __last1 && __binary_pred(*__first1, *__first2)) while (__first1 != __last1 && __binary_pred(*__first1, *__first2))
{ {
++__first1; ++__first1;
++__first2; ++__first2;
} }
return pair<_InputIter1, _InputIter2>(__first1, __first2); return pair<_InputIterator1, _InputIterator2>(__first1, __first2);
} }
/** /**
...@@ -638,16 +639,16 @@ namespace std ...@@ -638,16 +639,16 @@ namespace std
* false depending on whether all of the corresponding elements of the * false depending on whether all of the corresponding elements of the
* ranges are equal. * ranges are equal.
*/ */
template<typename _InputIter1, typename _InputIter2> template<typename _InputIterator1, typename _InputIterator2>
inline bool inline bool
equal(_InputIter1 __first1, _InputIter1 __last1, _InputIter2 __first2) equal(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2)
{ {
// concept requirements // concept requirements
__glibcpp_function_requires(_InputIteratorConcept<_InputIter1>) __glibcpp_function_requires(_InputIteratorConcept<_InputIterator1>)
__glibcpp_function_requires(_InputIteratorConcept<_InputIter2>) __glibcpp_function_requires(_InputIteratorConcept<_InputIterator2>)
__glibcpp_function_requires(_EqualOpConcept< __glibcpp_function_requires(_EqualOpConcept<
typename iterator_traits<_InputIter1>::value_type, typename iterator_traits<_InputIterator1>::value_type,
typename iterator_traits<_InputIter2>::value_type>) typename iterator_traits<_InputIterator2>::value_type>)
for ( ; __first1 != __last1; ++__first1, ++__first2) for ( ; __first1 != __last1; ++__first1, ++__first2)
if (!(*__first1 == *__first2)) if (!(*__first1 == *__first2))
...@@ -668,15 +669,15 @@ namespace std ...@@ -668,15 +669,15 @@ namespace std
* false depending on whether all of the corresponding elements of the * false depending on whether all of the corresponding elements of the
* ranges are equal. * ranges are equal.
*/ */
template<typename _InputIter1, typename _InputIter2, typename _BinaryPredicate> template<typename _InputIterator1, typename _InputIterator2, typename _BinaryPredicate>
inline bool inline bool
equal(_InputIter1 __first1, _InputIter1 __last1, equal(_InputIterator1 __first1, _InputIterator1 __last1,
_InputIter2 __first2, _InputIterator2 __first2,
_BinaryPredicate __binary_pred) _BinaryPredicate __binary_pred)
{ {
// concept requirements // concept requirements
__glibcpp_function_requires(_InputIteratorConcept<_InputIter1>) __glibcpp_function_requires(_InputIteratorConcept<_InputIterator1>)
__glibcpp_function_requires(_InputIteratorConcept<_InputIter2>) __glibcpp_function_requires(_InputIteratorConcept<_InputIterator2>)
for ( ; __first1 != __last1; ++__first1, ++__first2) for ( ; __first1 != __last1; ++__first1, ++__first2)
if (!__binary_pred(*__first1, *__first2)) if (!__binary_pred(*__first1, *__first2))
...@@ -698,18 +699,18 @@ namespace std ...@@ -698,18 +699,18 @@ namespace std
* (Quoted from [25.3.8]/1.) If the iterators are all character pointers, * (Quoted from [25.3.8]/1.) If the iterators are all character pointers,
* then this is an inline call to @c memcmp. * then this is an inline call to @c memcmp.
*/ */
template<typename _InputIter1, typename _InputIter2> template<typename _InputIterator1, typename _InputIterator2>
bool bool
lexicographical_compare(_InputIter1 __first1, _InputIter1 __last1, lexicographical_compare(_InputIterator1 __first1, _InputIterator1 __last1,
_InputIter2 __first2, _InputIter2 __last2) _InputIterator2 __first2, _InputIterator2 __last2)
{ {
// concept requirements // concept requirements
__glibcpp_function_requires(_InputIteratorConcept<_InputIter1>) __glibcpp_function_requires(_InputIteratorConcept<_InputIterator1>)
__glibcpp_function_requires(_InputIteratorConcept<_InputIter2>) __glibcpp_function_requires(_InputIteratorConcept<_InputIterator2>)
__glibcpp_function_requires(_LessThanComparableConcept< __glibcpp_function_requires(_LessThanComparableConcept<
typename iterator_traits<_InputIter1>::value_type>) typename iterator_traits<_InputIterator1>::value_type>)
__glibcpp_function_requires(_LessThanComparableConcept< __glibcpp_function_requires(_LessThanComparableConcept<
typename iterator_traits<_InputIter2>::value_type>) typename iterator_traits<_InputIterator2>::value_type>)
for (;__first1 != __last1 && __first2 != __last2; ++__first1, ++__first2) for (;__first1 != __last1 && __first2 != __last2; ++__first1, ++__first2)
{ {
...@@ -733,15 +734,15 @@ namespace std ...@@ -733,15 +734,15 @@ namespace std
* The same as the four-parameter @c lexigraphical_compare, but uses the * The same as the four-parameter @c lexigraphical_compare, but uses the
* comp parameter instead of @c <. * comp parameter instead of @c <.
*/ */
template<typename _InputIter1, typename _InputIter2, typename _Compare> template<typename _InputIterator1, typename _InputIterator2, typename _Compare>
bool bool
lexicographical_compare(_InputIter1 __first1, _InputIter1 __last1, lexicographical_compare(_InputIterator1 __first1, _InputIterator1 __last1,
_InputIter2 __first2, _InputIter2 __last2, _InputIterator2 __first2, _InputIterator2 __last2,
_Compare __comp) _Compare __comp)
{ {
// concept requirements // concept requirements
__glibcpp_function_requires(_InputIteratorConcept<_InputIter1>) __glibcpp_function_requires(_InputIteratorConcept<_InputIterator1>)
__glibcpp_function_requires(_InputIteratorConcept<_InputIter2>) __glibcpp_function_requires(_InputIteratorConcept<_InputIterator2>)
for ( ; __first1 != __last1 && __first2 != __last2 for ( ; __first1 != __last1 && __first2 != __last2
; ++__first1, ++__first2) ; ++__first1, ++__first2)
......
...@@ -575,8 +575,8 @@ template <typename _Alloc> ...@@ -575,8 +575,8 @@ template <typename _Alloc>
void _M_assign_dispatch(_Integer __n, _Integer __val, __true_type) void _M_assign_dispatch(_Integer __n, _Integer __val, __true_type)
{ _M_fill_assign((size_t) __n, (bool) __val); } { _M_fill_assign((size_t) __n, (bool) __val); }
template <class _InputIter> template <class _InputIterator>
void _M_assign_dispatch(_InputIter __first, _InputIter __last, __false_type) void _M_assign_dispatch(_InputIterator __first, _InputIterator __last, __false_type)
{ _M_assign_aux(__first, __last, __iterator_category(__first)); } { _M_assign_aux(__first, __last, __iterator_category(__first)); }
template <class _InputIterator> template <class _InputIterator>
......
...@@ -1112,7 +1112,7 @@ namespace std ...@@ -1112,7 +1112,7 @@ namespace std
/** /**
* @brief Inserts a range into the %deque. * @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 first An input iterator.
* @param last An input iterator. * @param last An input iterator.
* *
...@@ -1122,11 +1122,11 @@ namespace std ...@@ -1122,11 +1122,11 @@ namespace std
*/ */
template<typename _InputIterator> template<typename _InputIterator>
void 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. // Check whether it's an integral type. If so, it's not an iterator.
typedef typename _Is_integer<_InputIterator>::_Integral _Integral; 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 ...@@ -1203,12 +1203,12 @@ namespace std
} }
// called by the range constructor to implement [23.1.1]/9 // called by the range constructor to implement [23.1.1]/9
template<typename _InputIter> template<typename _InputIterator>
void void
_M_initialize_dispatch(_InputIter __first, _InputIter __last, _M_initialize_dispatch(_InputIterator __first, _InputIterator __last,
__false_type) __false_type)
{ {
typedef typename iterator_traits<_InputIter>::iterator_category typedef typename iterator_traits<_InputIterator>::iterator_category
_IterCategory; _IterCategory;
_M_range_initialize(__first, __last, _IterCategory()); _M_range_initialize(__first, __last, _IterCategory());
} }
...@@ -1268,11 +1268,11 @@ namespace std ...@@ -1268,11 +1268,11 @@ namespace std
} }
// called by the range assign to implement [23.1.1]/9 // called by the range assign to implement [23.1.1]/9
template<typename _InputIter> template<typename _InputIterator>
void 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; _IterCategory;
_M_assign_aux(__first, __last, _IterCategory()); _M_assign_aux(__first, __last, _IterCategory());
} }
......
...@@ -114,12 +114,12 @@ namespace std ...@@ -114,12 +114,12 @@ namespace std
return __distance(__first, __last, __iterator_category(__first)); return __distance(__first, __last, __iterator_category(__first));
} }
template<typename _InputIter, typename _Distance> template<typename _InputIterator, typename _Distance>
inline void inline void
__advance(_InputIter& __i, _Distance __n, input_iterator_tag) __advance(_InputIterator& __i, _Distance __n, input_iterator_tag)
{ {
// concept requirements // concept requirements
__glibcpp_function_requires(_InputIteratorConcept<_InputIter>) __glibcpp_function_requires(_InputIteratorConcept<_InputIterator>)
while (__n--) ++__i; while (__n--) ++__i;
} }
......
...@@ -773,12 +773,12 @@ namespace std ...@@ -773,12 +773,12 @@ namespace std
* time, and does not invalidate iterators and references. * time, and does not invalidate iterators and references.
*/ */
void void
insert(iterator __pos, size_type __n, const value_type& __x) insert(iterator __position, size_type __n, const value_type& __x)
{ _M_fill_insert(__pos, __n, __x); } { _M_fill_insert(__position, __n, __x); }
/** /**
* @brief Inserts a range into the %list. * @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 first An input iterator.
* @param last An input iterator. * @param last An input iterator.
* *
...@@ -790,11 +790,11 @@ namespace std ...@@ -790,11 +790,11 @@ namespace std
*/ */
template<typename _InputIterator> template<typename _InputIterator>
void 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. // Check whether it's an integral type. If so, it's not an iterator.
typedef typename _Is_integer<_InputIterator>::_Integral _Integral; 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 ...@@ -968,9 +968,9 @@ namespace std
} }
// called by the range assign to implement [23.1.1]/9 // called by the range assign to implement [23.1.1]/9
template<typename _InputIter> template<typename _InputIterator>
void 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 // Called by assign(n,t), and the range assign when it turns out to be the
// same thing. // same thing.
......
...@@ -271,7 +271,3 @@ inline void swap(multiset<_Key,_Compare,_Alloc>& __x, ...@@ -271,7 +271,3 @@ inline void swap(multiset<_Key,_Compare,_Alloc>& __x,
} // namespace std } // namespace std
#endif /* __GLIBCPP_INTERNAL_MULTISET_H */ #endif /* __GLIBCPP_INTERNAL_MULTISET_H */
// Local Variables:
// mode:C++
// End:
...@@ -209,7 +209,3 @@ namespace std ...@@ -209,7 +209,3 @@ namespace std
} // namespace std } // namespace std
#endif /* _CPP_BITS_STL_NUMERIC_H */ #endif /* _CPP_BITS_STL_NUMERIC_H */
// Local Variables:
// mode:C++
// End:
...@@ -135,7 +135,3 @@ inline bool operator>=(const _Tp& __x, const _Tp& __y) { ...@@ -135,7 +135,3 @@ inline bool operator>=(const _Tp& __x, const _Tp& __y) {
} // namespace std } // namespace std
#endif /* _CPP_BITS_STL_RELOPS_H */ #endif /* _CPP_BITS_STL_RELOPS_H */
// Local Variables:
// mode:C++
// End:
...@@ -268,7 +268,3 @@ inline void swap(set<_Key,_Compare,_Alloc>& __x, ...@@ -268,7 +268,3 @@ inline void swap(set<_Key,_Compare,_Alloc>& __x,
} // namespace std } // namespace std
#endif /* __GLIBCPP_INTERNAL_SET_H */ #endif /* __GLIBCPP_INTERNAL_SET_H */
// Local Variables:
// mode:C++
// End:
...@@ -208,7 +208,7 @@ namespace std ...@@ -208,7 +208,7 @@ namespace std
private: private:
void operator=(const _STL_auto_lock&); void operator=(const _STL_auto_lock&);
_STL_auto_lock(const _STL_auto_lock&); _STL_auto_lock(const _STL_auto_lock&);
}; } __attribute__ ((__unused__));
} // namespace std } // namespace std
......
...@@ -68,20 +68,20 @@ namespace std ...@@ -68,20 +68,20 @@ namespace std
// uninitialized_copy // uninitialized_copy
template<typename _InputIter, typename _ForwardIter> template<typename _InputIterator, typename _ForwardIterator>
inline _ForwardIter inline _ForwardIterator
__uninitialized_copy_aux(_InputIter __first, _InputIter __last, __uninitialized_copy_aux(_InputIterator __first, _InputIterator __last,
_ForwardIter __result, _ForwardIterator __result,
__true_type) __true_type)
{ return copy(__first, __last, __result); } { return copy(__first, __last, __result); }
template<typename _InputIter, typename _ForwardIter> template<typename _InputIterator, typename _ForwardIterator>
_ForwardIter _ForwardIterator
__uninitialized_copy_aux(_InputIter __first, _InputIter __last, __uninitialized_copy_aux(_InputIterator __first, _InputIterator __last,
_ForwardIter __result, _ForwardIterator __result,
__false_type) __false_type)
{ {
_ForwardIter __cur = __result; _ForwardIterator __cur = __result;
try { try {
for ( ; __first != __last; ++__first, ++__cur) for ( ; __first != __last; ++__first, ++__cur)
_Construct(&*__cur, *__first); _Construct(&*__cur, *__first);
...@@ -103,11 +103,11 @@ namespace std ...@@ -103,11 +103,11 @@ namespace std
* *
* Like copy(), but does not require an initialized output range. * Like copy(), but does not require an initialized output range.
*/ */
template<typename _InputIter, typename _ForwardIter> template<typename _InputIterator, typename _ForwardIterator>
inline _ForwardIter inline _ForwardIterator
uninitialized_copy(_InputIter __first, _InputIter __last, _ForwardIter __result) 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; typedef typename __type_traits<_ValueType>::is_POD_type _Is_POD;
return __uninitialized_copy_aux(__first, __last, __result, _Is_POD()); return __uninitialized_copy_aux(__first, __last, __result, _Is_POD());
} }
...@@ -129,18 +129,18 @@ namespace std ...@@ -129,18 +129,18 @@ namespace std
// Valid if copy construction is equivalent to assignment, and if the // Valid if copy construction is equivalent to assignment, and if the
// destructor is trivial. // destructor is trivial.
template<typename _ForwardIter, typename _Tp> template<typename _ForwardIterator, typename _Tp>
inline void inline void
__uninitialized_fill_aux(_ForwardIter __first, _ForwardIter __last, __uninitialized_fill_aux(_ForwardIterator __first, _ForwardIterator __last,
const _Tp& __x, __true_type) const _Tp& __x, __true_type)
{ fill(__first, __last, __x); } { fill(__first, __last, __x); }
template<typename _ForwardIter, typename _Tp> template<typename _ForwardIterator, typename _Tp>
void void
__uninitialized_fill_aux(_ForwardIter __first, _ForwardIter __last, __uninitialized_fill_aux(_ForwardIterator __first, _ForwardIterator __last,
const _Tp& __x, __false_type) const _Tp& __x, __false_type)
{ {
_ForwardIter __cur = __first; _ForwardIterator __cur = __first;
try { try {
for ( ; __cur != __last; ++__cur) for ( ; __cur != __last; ++__cur)
_Construct(&*__cur, __x); _Construct(&*__cur, __x);
...@@ -161,31 +161,31 @@ namespace std ...@@ -161,31 +161,31 @@ namespace std
* *
* Like fill(), but does not require an initialized output range. * Like fill(), but does not require an initialized output range.
*/ */
template<typename _ForwardIter, typename _Tp> template<typename _ForwardIterator, typename _Tp>
inline void 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; typedef typename __type_traits<_ValueType>::is_POD_type _Is_POD;
__uninitialized_fill_aux(__first, __last, __x, _Is_POD()); __uninitialized_fill_aux(__first, __last, __x, _Is_POD());
} }
// Valid if copy construction is equivalent to assignment, and if the // Valid if copy construction is equivalent to assignment, and if the
// destructor is trivial. // destructor is trivial.
template<typename _ForwardIter, typename _Size, typename _Tp> template<typename _ForwardIterator, typename _Size, typename _Tp>
inline _ForwardIter inline _ForwardIterator
__uninitialized_fill_n_aux(_ForwardIter __first, _Size __n, __uninitialized_fill_n_aux(_ForwardIterator __first, _Size __n,
const _Tp& __x, __true_type) const _Tp& __x, __true_type)
{ {
return fill_n(__first, __n, __x); return fill_n(__first, __n, __x);
} }
template<typename _ForwardIter, typename _Size, typename _Tp> template<typename _ForwardIterator, typename _Size, typename _Tp>
_ForwardIter _ForwardIterator
__uninitialized_fill_n_aux(_ForwardIter __first, _Size __n, __uninitialized_fill_n_aux(_ForwardIterator __first, _Size __n,
const _Tp& __x, __false_type) const _Tp& __x, __false_type)
{ {
_ForwardIter __cur = __first; _ForwardIterator __cur = __first;
try { try {
for ( ; __n > 0; --__n, ++__cur) for ( ; __n > 0; --__n, ++__cur)
_Construct(&*__cur, __x); _Construct(&*__cur, __x);
...@@ -207,11 +207,11 @@ namespace std ...@@ -207,11 +207,11 @@ namespace std
* *
* Like fill_n(), but does not require an initialized output range. * Like fill_n(), but does not require an initialized output range.
*/ */
template<typename _ForwardIter, typename _Size, typename _Tp> template<typename _ForwardIterator, typename _Size, typename _Tp>
inline _ForwardIter inline _ForwardIterator
uninitialized_fill_n(_ForwardIter __first, _Size __n, const _Tp& __x) 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; typedef typename __type_traits<_ValueType>::is_POD_type _Is_POD;
return __uninitialized_fill_n_aux(__first, __n, __x, _Is_POD()); return __uninitialized_fill_n_aux(__first, __n, __x, _Is_POD());
} }
...@@ -224,13 +224,13 @@ namespace std ...@@ -224,13 +224,13 @@ namespace std
// copies [first2, last2) into // copies [first2, last2) into
// [result, result + (last1 - first1) + (last2 - first2)). // [result, result + (last1 - first1) + (last2 - first2)).
template<typename _InputIter1, typename _InputIter2, typename _ForwardIter> template<typename _InputIterator1, typename _InputIterator2, typename _ForwardIterator>
inline _ForwardIter inline _ForwardIterator
__uninitialized_copy_copy(_InputIter1 __first1, _InputIter1 __last1, __uninitialized_copy_copy(_InputIterator1 __first1, _InputIterator1 __last1,
_InputIter2 __first2, _InputIter2 __last2, _InputIterator2 __first2, _InputIterator2 __last2,
_ForwardIter __result) _ForwardIterator __result)
{ {
_ForwardIter __mid = uninitialized_copy(__first1, __last1, __result); _ForwardIterator __mid = uninitialized_copy(__first1, __last1, __result);
try { try {
return uninitialized_copy(__first2, __last2, __mid); return uninitialized_copy(__first2, __last2, __mid);
} }
...@@ -244,11 +244,11 @@ namespace std ...@@ -244,11 +244,11 @@ namespace std
// __uninitialized_fill_copy // __uninitialized_fill_copy
// Fills [result, mid) with x, and copies [first, last) into // Fills [result, mid) with x, and copies [first, last) into
// [mid, mid + (last - first)). // [mid, mid + (last - first)).
template<typename _ForwardIter, typename _Tp, typename _InputIter> template<typename _ForwardIterator, typename _Tp, typename _InputIterator>
inline _ForwardIter inline _ForwardIterator
__uninitialized_fill_copy(_ForwardIter __result, _ForwardIter __mid, __uninitialized_fill_copy(_ForwardIterator __result, _ForwardIterator __mid,
const _Tp& __x, const _Tp& __x,
_InputIter __first, _InputIter __last) _InputIterator __first, _InputIterator __last)
{ {
uninitialized_fill(__result, __mid, __x); uninitialized_fill(__result, __mid, __x);
try { try {
...@@ -264,13 +264,13 @@ namespace std ...@@ -264,13 +264,13 @@ namespace std
// __uninitialized_copy_fill // __uninitialized_copy_fill
// Copies [first1, last1) into [first2, first2 + (last1 - first1)), and // Copies [first1, last1) into [first2, first2 + (last1 - first1)), and
// fills [first2 + (last1 - first1), last2) with x. // fills [first2 + (last1 - first1), last2) with x.
template<typename _InputIter, typename _ForwardIter, typename _Tp> template<typename _InputIterator, typename _ForwardIterator, typename _Tp>
inline void inline void
__uninitialized_copy_fill(_InputIter __first1, _InputIter __last1, __uninitialized_copy_fill(_InputIterator __first1, _InputIterator __last1,
_ForwardIter __first2, _ForwardIter __last2, _ForwardIterator __first2, _ForwardIterator __last2,
const _Tp& __x) const _Tp& __x)
{ {
_ForwardIter __mid2 = uninitialized_copy(__first1, __last1, __first2); _ForwardIterator __mid2 = uninitialized_copy(__first1, __last1, __first2);
try { try {
uninitialized_fill(__mid2, __last2, __x); uninitialized_fill(__mid2, __last2, __x);
} }
...@@ -284,7 +284,3 @@ namespace std ...@@ -284,7 +284,3 @@ namespace std
} // namespace std } // namespace std
#endif /* _CPP_BITS_STL_UNINITIALIZED_H */ #endif /* _CPP_BITS_STL_UNINITIALIZED_H */
// Local Variables:
// mode:C++
// End:
...@@ -650,12 +650,12 @@ namespace std ...@@ -650,12 +650,12 @@ namespace std
* consider using std::list. * consider using std::list.
*/ */
void void
insert(iterator __pos, size_type __n, const value_type& __x) insert(iterator __position, size_type __n, const value_type& __x)
{ _M_fill_insert(__pos, __n, __x); } { _M_fill_insert(__position, __n, __x); }
/** /**
* @brief Inserts a range into the %vector. * @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 first An input iterator.
* @param last An input iterator. * @param last An input iterator.
* *
...@@ -669,11 +669,11 @@ namespace std ...@@ -669,11 +669,11 @@ namespace std
*/ */
template<typename _InputIterator> template<typename _InputIterator>
void 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. // Check whether it's an integral type. If so, it's not an iterator.
typedef typename _Is_integer<_InputIterator>::_Integral _Integral; 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 ...@@ -780,12 +780,12 @@ namespace std
} }
// Called by the range constructor to implement [23.1.1]/9 // Called by the range constructor to implement [23.1.1]/9
template<typename _InputIter> template<typename _InputIterator>
void void
_M_initialize_dispatch(_InputIter __first, _InputIter __last, _M_initialize_dispatch(_InputIterator __first, _InputIterator __last,
__false_type) __false_type)
{ {
typedef typename iterator_traits<_InputIter>::iterator_category typedef typename iterator_traits<_InputIterator>::iterator_category
_IterCategory; _IterCategory;
_M_range_initialize(__first, __last, _IterCategory()); _M_range_initialize(__first, __last, _IterCategory());
} }
...@@ -827,11 +827,11 @@ namespace std ...@@ -827,11 +827,11 @@ namespace std
} }
// Called by the range assign to implement [23.1.1]/9 // Called by the range assign to implement [23.1.1]/9
template<typename _InputIter> template<typename _InputIterator>
void 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; _IterCategory;
_M_assign_aux(__first, __last, _IterCategory()); _M_assign_aux(__first, __last, _IterCategory());
} }
......
...@@ -176,10 +176,10 @@ namespace std ...@@ -176,10 +176,10 @@ namespace std
erase(fill_n(begin(), __n, __val), end()); erase(fill_n(begin(), __n, __val), end());
} }
template<typename _Tp, typename _Alloc> template<typename _InputIter> template<typename _Tp, typename _Alloc> template<typename _InputIterator>
void void
vector<_Tp,_Alloc>:: 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()); iterator __cur(begin());
for ( ; __first != __last && __cur != end(); ++__cur, ++__first) for ( ; __first != __last && __cur != end(); ++__cur, ++__first)
...@@ -190,10 +190,10 @@ namespace std ...@@ -190,10 +190,10 @@ namespace std
insert(end(), __first, __last); insert(end(), __first, __last);
} }
template<typename _Tp, typename _Alloc> template<typename _ForwardIter> template<typename _Tp, typename _Alloc> template<typename _ForwardIterator>
void void
vector<_Tp,_Alloc>:: vector<_Tp,_Alloc>::
_M_assign_aux(_ForwardIter __first, _ForwardIter __last, _M_assign_aux(_ForwardIterator __first, _ForwardIterator __last,
forward_iterator_tag) forward_iterator_tag)
{ {
size_type __len = std::distance(__first, __last); size_type __len = std::distance(__first, __last);
...@@ -215,7 +215,7 @@ namespace std ...@@ -215,7 +215,7 @@ namespace std
} }
else else
{ {
_ForwardIter __mid = __first; _ForwardIterator __mid = __first;
advance(__mid, size()); advance(__mid, size());
copy(__first, __mid, this->_M_start); copy(__first, __mid, this->_M_start);
this->_M_finish = uninitialized_copy(__mid, __last, this->_M_finish); this->_M_finish = uninitialized_copy(__mid, __last, this->_M_finish);
......
...@@ -77,10 +77,10 @@ namespace __gnu_cxx ...@@ -77,10 +77,10 @@ namespace __gnu_cxx
//-------------------------------------------------- //--------------------------------------------------
// copy_n (not part of the C++ standard) // copy_n (not part of the C++ standard)
template<typename _InputIter, typename _Size, typename _OutputIter> template<typename _InputIterator, typename _Size, typename _OutputIterator>
pair<_InputIter, _OutputIter> pair<_InputIterator, _OutputIterator>
__copy_n(_InputIter __first, _Size __count, __copy_n(_InputIterator __first, _Size __count,
_OutputIter __result, _OutputIterator __result,
input_iterator_tag) input_iterator_tag)
{ {
for ( ; __count > 0; --__count) { for ( ; __count > 0; --__count) {
...@@ -88,17 +88,17 @@ namespace __gnu_cxx ...@@ -88,17 +88,17 @@ namespace __gnu_cxx
++__first; ++__first;
++__result; ++__result;
} }
return pair<_InputIter, _OutputIter>(__first, __result); return pair<_InputIterator, _OutputIterator>(__first, __result);
} }
template<typename _RAIter, typename _Size, typename _OutputIter> template<typename _RAIterator, typename _Size, typename _OutputIterator>
inline pair<_RAIter, _OutputIter> inline pair<_RAIterator, _OutputIterator>
__copy_n(_RAIter __first, _Size __count, __copy_n(_RAIterator __first, _Size __count,
_OutputIter __result, _OutputIterator __result,
random_access_iterator_tag) random_access_iterator_tag)
{ {
_RAIter __last = __first + __count; _RAIterator __last = __first + __count;
return pair<_RAIter, _OutputIter>(__last, return pair<_RAIterator, _OutputIterator>(__last,
std::copy(__first, __last, __result)); std::copy(__first, __last, __result));
} }
...@@ -116,23 +116,23 @@ namespace __gnu_cxx ...@@ -116,23 +116,23 @@ namespace __gnu_cxx
* optimizations such as unrolling). * optimizations such as unrolling).
* @ingroup SGIextensions * @ingroup SGIextensions
*/ */
template<typename _InputIter, typename _Size, typename _OutputIter> template<typename _InputIterator, typename _Size, typename _OutputIterator>
inline pair<_InputIter, _OutputIter> inline pair<_InputIterator, _OutputIterator>
copy_n(_InputIter __first, _Size __count, _OutputIter __result) copy_n(_InputIterator __first, _Size __count, _OutputIterator __result)
{ {
// concept requirements // concept requirements
__glibcpp_function_requires(_InputIteratorConcept<_InputIter>) __glibcpp_function_requires(_InputIteratorConcept<_InputIterator>)
__glibcpp_function_requires(_OutputIteratorConcept<_OutputIter, __glibcpp_function_requires(_OutputIteratorConcept<_OutputIterator,
typename iterator_traits<_InputIter>::value_type>) typename iterator_traits<_InputIterator>::value_type>)
return __copy_n(__first, __count, __result, return __copy_n(__first, __count, __result,
std::__iterator_category(__first)); std::__iterator_category(__first));
} }
template<typename _InputIter1, typename _InputIter2> template<typename _InputIterator1, typename _InputIterator2>
int int
__lexicographical_compare_3way(_InputIter1 __first1, _InputIter1 __last1, __lexicographical_compare_3way(_InputIterator1 __first1, _InputIterator1 __last1,
_InputIter2 __first2, _InputIter2 __last2) _InputIterator2 __first2, _InputIterator2 __last2)
{ {
while (__first1 != __last1 && __first2 != __last2) { while (__first1 != __last1 && __first2 != __last2) {
if (*__first1 < *__first2) if (*__first1 < *__first2)
...@@ -195,18 +195,18 @@ namespace __gnu_cxx ...@@ -195,18 +195,18 @@ namespace __gnu_cxx
* This is an SGI extension. * This is an SGI extension.
* @ingroup SGIextensions * @ingroup SGIextensions
*/ */
template<typename _InputIter1, typename _InputIter2> template<typename _InputIterator1, typename _InputIterator2>
int int
lexicographical_compare_3way(_InputIter1 __first1, _InputIter1 __last1, lexicographical_compare_3way(_InputIterator1 __first1, _InputIterator1 __last1,
_InputIter2 __first2, _InputIter2 __last2) _InputIterator2 __first2, _InputIterator2 __last2)
{ {
// concept requirements // concept requirements
__glibcpp_function_requires(_InputIteratorConcept<_InputIter1>) __glibcpp_function_requires(_InputIteratorConcept<_InputIterator1>)
__glibcpp_function_requires(_InputIteratorConcept<_InputIter2>) __glibcpp_function_requires(_InputIteratorConcept<_InputIterator2>)
__glibcpp_function_requires(_LessThanComparableConcept< __glibcpp_function_requires(_LessThanComparableConcept<
typename iterator_traits<_InputIter1>::value_type>) typename iterator_traits<_InputIterator1>::value_type>)
__glibcpp_function_requires(_LessThanComparableConcept< __glibcpp_function_requires(_LessThanComparableConcept<
typename iterator_traits<_InputIter2>::value_type>) typename iterator_traits<_InputIterator2>::value_type>)
return __lexicographical_compare_3way(__first1, __last1, __first2, __last2); return __lexicographical_compare_3way(__first1, __last1, __first2, __last2);
} }
...@@ -214,32 +214,32 @@ namespace __gnu_cxx ...@@ -214,32 +214,32 @@ namespace __gnu_cxx
// count and count_if: this version, whose return type is void, was present // 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. // 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 void
count(_InputIter __first, _InputIter __last, count(_InputIterator __first, _InputIterator __last,
const _Tp& __value, const _Tp& __value,
_Size& __n) _Size& __n)
{ {
// concept requirements // concept requirements
__glibcpp_function_requires(_InputIteratorConcept<_InputIter>) __glibcpp_function_requires(_InputIteratorConcept<_InputIterator>)
__glibcpp_function_requires(_EqualityComparableConcept< __glibcpp_function_requires(_EqualityComparableConcept<
typename iterator_traits<_InputIter>::value_type >) typename iterator_traits<_InputIterator>::value_type >)
__glibcpp_function_requires(_EqualityComparableConcept<_Tp>) __glibcpp_function_requires(_EqualityComparableConcept<_Tp>)
for ( ; __first != __last; ++__first) for ( ; __first != __last; ++__first)
if (*__first == __value) if (*__first == __value)
++__n; ++__n;
} }
template<typename _InputIter, typename _Predicate, typename _Size> template<typename _InputIterator, typename _Predicate, typename _Size>
void void
count_if(_InputIter __first, _InputIter __last, count_if(_InputIterator __first, _InputIterator __last,
_Predicate __pred, _Predicate __pred,
_Size& __n) _Size& __n)
{ {
// concept requirements // concept requirements
__glibcpp_function_requires(_InputIteratorConcept<_InputIter>) __glibcpp_function_requires(_InputIteratorConcept<_InputIterator>)
__glibcpp_function_requires(_UnaryPredicateConcept<_Predicate, __glibcpp_function_requires(_UnaryPredicateConcept<_Predicate,
typename iterator_traits<_InputIter>::value_type>) typename iterator_traits<_InputIterator>::value_type>)
for ( ; __first != __last; ++__first) for ( ; __first != __last; ++__first)
if (__pred(*__first)) if (__pred(*__first))
++__n; ++__n;
...@@ -252,15 +252,15 @@ namespace __gnu_cxx ...@@ -252,15 +252,15 @@ namespace __gnu_cxx
* @ingroup SGIextensions * @ingroup SGIextensions
* @doctodo * @doctodo
*/ */
template<typename _ForwardIter, typename _OutputIter, typename _Distance> template<typename _ForwardIterator, typename _OutputIterator, typename _Distance>
_OutputIter _OutputIterator
random_sample_n(_ForwardIter __first, _ForwardIter __last, random_sample_n(_ForwardIterator __first, _ForwardIterator __last,
_OutputIter __out, const _Distance __n) _OutputIterator __out, const _Distance __n)
{ {
// concept requirements // concept requirements
__glibcpp_function_requires(_ForwardIteratorConcept<_ForwardIter>) __glibcpp_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
__glibcpp_function_requires(_OutputIteratorConcept<_OutputIter, __glibcpp_function_requires(_OutputIteratorConcept<_OutputIterator,
typename iterator_traits<_ForwardIter>::value_type>) typename iterator_traits<_ForwardIterator>::value_type>)
_Distance __remaining = std::distance(__first, __last); _Distance __remaining = std::distance(__first, __last);
_Distance __m = min(__n, __remaining); _Distance __m = min(__n, __remaining);
...@@ -283,17 +283,17 @@ namespace __gnu_cxx ...@@ -283,17 +283,17 @@ namespace __gnu_cxx
* @ingroup SGIextensions * @ingroup SGIextensions
* @doctodo * @doctodo
*/ */
template<typename _ForwardIter, typename _OutputIter, typename _Distance, template<typename _ForwardIterator, typename _OutputIterator, typename _Distance,
typename _RandomNumberGenerator> typename _RandomNumberGenerator>
_OutputIter _OutputIterator
random_sample_n(_ForwardIter __first, _ForwardIter __last, random_sample_n(_ForwardIterator __first, _ForwardIterator __last,
_OutputIter __out, const _Distance __n, _OutputIterator __out, const _Distance __n,
_RandomNumberGenerator& __rand) _RandomNumberGenerator& __rand)
{ {
// concept requirements // concept requirements
__glibcpp_function_requires(_ForwardIteratorConcept<_ForwardIter>) __glibcpp_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
__glibcpp_function_requires(_OutputIteratorConcept<_OutputIter, __glibcpp_function_requires(_OutputIteratorConcept<_OutputIterator,
typename iterator_traits<_ForwardIter>::value_type>) typename iterator_traits<_ForwardIterator>::value_type>)
__glibcpp_function_requires(_UnaryFunctionConcept< __glibcpp_function_requires(_UnaryFunctionConcept<
_RandomNumberGenerator, _Distance, _Distance>) _RandomNumberGenerator, _Distance, _Distance>)
...@@ -313,10 +313,10 @@ namespace __gnu_cxx ...@@ -313,10 +313,10 @@ namespace __gnu_cxx
return __out; return __out;
} }
template<typename _InputIter, typename _RandomAccessIter, typename _Distance> template<typename _InputIterator, typename _RandomAccessIterator, typename _Distance>
_RandomAccessIter _RandomAccessIterator
__random_sample(_InputIter __first, _InputIter __last, __random_sample(_InputIterator __first, _InputIterator __last,
_RandomAccessIter __out, _RandomAccessIterator __out,
const _Distance __n) const _Distance __n)
{ {
_Distance __m = 0; _Distance __m = 0;
...@@ -335,11 +335,11 @@ namespace __gnu_cxx ...@@ -335,11 +335,11 @@ namespace __gnu_cxx
return __out + __m; return __out + __m;
} }
template<typename _InputIter, typename _RandomAccessIter, template<typename _InputIterator, typename _RandomAccessIterator,
typename _RandomNumberGenerator, typename _Distance> typename _RandomNumberGenerator, typename _Distance>
_RandomAccessIter _RandomAccessIterator
__random_sample(_InputIter __first, _InputIter __last, __random_sample(_InputIterator __first, _InputIterator __last,
_RandomAccessIter __out, _RandomAccessIterator __out,
_RandomNumberGenerator& __rand, _RandomNumberGenerator& __rand,
const _Distance __n) const _Distance __n)
{ {
...@@ -368,15 +368,15 @@ namespace __gnu_cxx ...@@ -368,15 +368,15 @@ namespace __gnu_cxx
* @ingroup SGIextensions * @ingroup SGIextensions
* @doctodo * @doctodo
*/ */
template<typename _InputIter, typename _RandomAccessIter> template<typename _InputIterator, typename _RandomAccessIterator>
inline _RandomAccessIter inline _RandomAccessIterator
random_sample(_InputIter __first, _InputIter __last, random_sample(_InputIterator __first, _InputIterator __last,
_RandomAccessIter __out_first, _RandomAccessIter __out_last) _RandomAccessIterator __out_first, _RandomAccessIterator __out_last)
{ {
// concept requirements // concept requirements
__glibcpp_function_requires(_InputIteratorConcept<_InputIter>) __glibcpp_function_requires(_InputIteratorConcept<_InputIterator>)
__glibcpp_function_requires(_Mutable_RandomAccessIteratorConcept< __glibcpp_function_requires(_Mutable_RandomAccessIteratorConcept<
_RandomAccessIter>) _RandomAccessIterator>)
return __random_sample(__first, __last, return __random_sample(__first, __last,
__out_first, __out_last - __out_first); __out_first, __out_last - __out_first);
...@@ -387,17 +387,17 @@ namespace __gnu_cxx ...@@ -387,17 +387,17 @@ namespace __gnu_cxx
* @ingroup SGIextensions * @ingroup SGIextensions
* @doctodo * @doctodo
*/ */
template<typename _InputIter, typename _RandomAccessIter, template<typename _InputIterator, typename _RandomAccessIterator,
typename _RandomNumberGenerator> typename _RandomNumberGenerator>
inline _RandomAccessIter inline _RandomAccessIterator
random_sample(_InputIter __first, _InputIter __last, random_sample(_InputIterator __first, _InputIterator __last,
_RandomAccessIter __out_first, _RandomAccessIter __out_last, _RandomAccessIterator __out_first, _RandomAccessIterator __out_last,
_RandomNumberGenerator& __rand) _RandomNumberGenerator& __rand)
{ {
// concept requirements // concept requirements
__glibcpp_function_requires(_InputIteratorConcept<_InputIter>) __glibcpp_function_requires(_InputIteratorConcept<_InputIterator>)
__glibcpp_function_requires(_Mutable_RandomAccessIteratorConcept< __glibcpp_function_requires(_Mutable_RandomAccessIteratorConcept<
_RandomAccessIter>) _RandomAccessIterator>)
return __random_sample(__first, __last, return __random_sample(__first, __last,
__out_first, __rand, __out_first, __rand,
...@@ -408,9 +408,9 @@ namespace __gnu_cxx ...@@ -408,9 +408,9 @@ namespace __gnu_cxx
// a heap. This function is an extension, not part of the C++ // a heap. This function is an extension, not part of the C++
// standard. // standard.
template<typename _RandomAccessIter, typename _Distance> template<typename _RandomAccessIterator, typename _Distance>
bool bool
__is_heap(_RandomAccessIter __first, _Distance __n) __is_heap(_RandomAccessIterator __first, _Distance __n)
{ {
_Distance __parent = 0; _Distance __parent = 0;
for (_Distance __child = 1; __child < __n; ++__child) { for (_Distance __child = 1; __child < __n; ++__child) {
...@@ -422,10 +422,10 @@ namespace __gnu_cxx ...@@ -422,10 +422,10 @@ namespace __gnu_cxx
return true; return true;
} }
template<typename _RandomAccessIter, typename _Distance, template<typename _RandomAccessIterator, typename _Distance,
typename _StrictWeakOrdering> typename _StrictWeakOrdering>
bool bool
__is_heap(_RandomAccessIter __first, _StrictWeakOrdering __comp, __is_heap(_RandomAccessIterator __first, _StrictWeakOrdering __comp,
_Distance __n) _Distance __n)
{ {
_Distance __parent = 0; _Distance __parent = 0;
...@@ -443,14 +443,14 @@ namespace __gnu_cxx ...@@ -443,14 +443,14 @@ namespace __gnu_cxx
* @ingroup SGIextensions * @ingroup SGIextensions
* @doctodo * @doctodo
*/ */
template<typename _RandomAccessIter> template<typename _RandomAccessIterator>
inline bool inline bool
is_heap(_RandomAccessIter __first, _RandomAccessIter __last) is_heap(_RandomAccessIterator __first, _RandomAccessIterator __last)
{ {
// concept requirements // concept requirements
__glibcpp_function_requires(_RandomAccessIteratorConcept<_RandomAccessIter>) __glibcpp_function_requires(_RandomAccessIteratorConcept<_RandomAccessIterator>)
__glibcpp_function_requires(_LessThanComparableConcept< __glibcpp_function_requires(_LessThanComparableConcept<
typename iterator_traits<_RandomAccessIter>::value_type>) typename iterator_traits<_RandomAccessIterator>::value_type>)
return __is_heap(__first, __last - __first); return __is_heap(__first, __last - __first);
} }
...@@ -460,16 +460,16 @@ namespace __gnu_cxx ...@@ -460,16 +460,16 @@ namespace __gnu_cxx
* @ingroup SGIextensions * @ingroup SGIextensions
* @doctodo * @doctodo
*/ */
template<typename _RandomAccessIter, typename _StrictWeakOrdering> template<typename _RandomAccessIterator, typename _StrictWeakOrdering>
inline bool inline bool
is_heap(_RandomAccessIter __first, _RandomAccessIter __last, is_heap(_RandomAccessIterator __first, _RandomAccessIterator __last,
_StrictWeakOrdering __comp) _StrictWeakOrdering __comp)
{ {
// concept requirements // concept requirements
__glibcpp_function_requires(_RandomAccessIteratorConcept<_RandomAccessIter>) __glibcpp_function_requires(_RandomAccessIteratorConcept<_RandomAccessIterator>)
__glibcpp_function_requires(_BinaryPredicateConcept<_StrictWeakOrdering, __glibcpp_function_requires(_BinaryPredicateConcept<_StrictWeakOrdering,
typename iterator_traits<_RandomAccessIter>::value_type, typename iterator_traits<_RandomAccessIterator>::value_type,
typename iterator_traits<_RandomAccessIter>::value_type>) typename iterator_traits<_RandomAccessIterator>::value_type>)
return __is_heap(__first, __comp, __last - __first); return __is_heap(__first, __comp, __last - __first);
} }
...@@ -483,19 +483,19 @@ namespace __gnu_cxx ...@@ -483,19 +483,19 @@ namespace __gnu_cxx
* @ingroup SGIextensions * @ingroup SGIextensions
* @doctodo * @doctodo
*/ */
template<typename _ForwardIter> template<typename _ForwardIterator>
bool bool
is_sorted(_ForwardIter __first, _ForwardIter __last) is_sorted(_ForwardIterator __first, _ForwardIterator __last)
{ {
// concept requirements // concept requirements
__glibcpp_function_requires(_ForwardIteratorConcept<_ForwardIter>) __glibcpp_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
__glibcpp_function_requires(_LessThanComparableConcept< __glibcpp_function_requires(_LessThanComparableConcept<
typename iterator_traits<_ForwardIter>::value_type>) typename iterator_traits<_ForwardIterator>::value_type>)
if (__first == __last) if (__first == __last)
return true; return true;
_ForwardIter __next = __first; _ForwardIterator __next = __first;
for (++__next; __next != __last; __first = __next, ++__next) { for (++__next; __next != __last; __first = __next, ++__next) {
if (*__next < *__first) if (*__next < *__first)
return false; return false;
...@@ -509,20 +509,20 @@ namespace __gnu_cxx ...@@ -509,20 +509,20 @@ namespace __gnu_cxx
* @ingroup SGIextensions * @ingroup SGIextensions
* @doctodo * @doctodo
*/ */
template<typename _ForwardIter, typename _StrictWeakOrdering> template<typename _ForwardIterator, typename _StrictWeakOrdering>
bool bool
is_sorted(_ForwardIter __first, _ForwardIter __last, _StrictWeakOrdering __comp) is_sorted(_ForwardIterator __first, _ForwardIterator __last, _StrictWeakOrdering __comp)
{ {
// concept requirements // concept requirements
__glibcpp_function_requires(_ForwardIteratorConcept<_ForwardIter>) __glibcpp_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
__glibcpp_function_requires(_BinaryPredicateConcept<_StrictWeakOrdering, __glibcpp_function_requires(_BinaryPredicateConcept<_StrictWeakOrdering,
typename iterator_traits<_ForwardIter>::value_type, typename iterator_traits<_ForwardIterator>::value_type,
typename iterator_traits<_ForwardIter>::value_type>) typename iterator_traits<_ForwardIterator>::value_type>)
if (__first == __last) if (__first == __last)
return true; return true;
_ForwardIter __next = __first; _ForwardIterator __next = __first;
for (++__next; __next != __last; __first = __next, ++__next) { for (++__next; __next != __last; __first = __next, ++__next) {
if (__comp(*__next, *__first)) if (__comp(*__next, *__first))
return false; return false;
......
...@@ -474,10 +474,10 @@ private: ...@@ -474,10 +474,10 @@ private:
} }
// Check whether it's an integral type. If so, it's not an iterator. // 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, void _M_insert_after_range(_Node_base* __pos,
_InIter __first, _InIter __last) { _InIterator __first, _InIterator __last) {
typedef typename _Is_integer<_InIter>::_Integral _Integral; typedef typename _Is_integer<_InIterator>::_Integral _Integral;
_M_insert_after_range(__pos, __first, __last, _Integral()); _M_insert_after_range(__pos, __first, __last, _Integral());
} }
...@@ -487,9 +487,9 @@ private: ...@@ -487,9 +487,9 @@ private:
_M_insert_after_fill(__pos, __n, __x); _M_insert_after_fill(__pos, __n, __x);
} }
template <class _InIter> template <class _InIterator>
void _M_insert_after_range(_Node_base* __pos, void _M_insert_after_range(_Node_base* __pos,
_InIter __first, _InIter __last, _InIterator __first, _InIterator __last,
__false_type) { __false_type) {
while (__first != __last) { while (__first != __last) {
__pos = __slist_make_link(__pos, _M_create_node(*__first)); __pos = __slist_make_link(__pos, _M_create_node(*__first));
...@@ -513,8 +513,8 @@ public: ...@@ -513,8 +513,8 @@ public:
// We don't need any dispatching tricks here, because _M_insert_after_range // We don't need any dispatching tricks here, because _M_insert_after_range
// already does them. // already does them.
template <class _InIter> template <class _InIterator>
void insert_after(iterator __pos, _InIter __first, _InIter __last) { void insert_after(iterator __pos, _InIterator __first, _InIterator __last) {
_M_insert_after_range(__pos._M_node, __first, __last); _M_insert_after_range(__pos._M_node, __first, __last);
} }
...@@ -537,8 +537,8 @@ public: ...@@ -537,8 +537,8 @@ public:
// We don't need any dispatching tricks here, because _M_insert_after_range // We don't need any dispatching tricks here, because _M_insert_after_range
// already does them. // already does them.
template <class _InIter> template <class _InIterator>
void insert(iterator __pos, _InIter __first, _InIter __last) { void insert(iterator __pos, _InIterator __first, _InIterator __last) {
_M_insert_after_range(__slist_previous(&this->_M_head, __pos._M_node), _M_insert_after_range(__slist_previous(&this->_M_head, __pos._M_node),
__first, __last); __first, __last);
} }
...@@ -678,9 +678,9 @@ void slist<_Tp, _Alloc>::_M_fill_assign(size_type __n, const _Tp& __val) { ...@@ -678,9 +678,9 @@ void slist<_Tp, _Alloc>::_M_fill_assign(size_type __n, const _Tp& __val) {
this->_M_erase_after(__prev, 0); this->_M_erase_after(__prev, 0);
} }
template <class _Tp, class _Alloc> template <class _InputIter> template <class _Tp, class _Alloc> template <class _InputIterator>
void void
slist<_Tp, _Alloc>::_M_assign_dispatch(_InputIter __first, _InputIter __last, slist<_Tp, _Alloc>::_M_assign_dispatch(_InputIterator __first, _InputIterator __last,
__false_type) __false_type)
{ {
_Node_base* __prev = &this->_M_head; _Node_base* __prev = &this->_M_head;
......
...@@ -698,7 +698,7 @@ namespace std ...@@ -698,7 +698,7 @@ namespace std
/** /**
* @brief Use a subset of a string. * @brief Use a subset of a string.
* @param s A string of '0' and '1' characters. * @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. * to zero.
* @throw std::out_of_range If @a pos is bigger the size of @a s. * @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 * @throw std::invalid_argument If a character appears in the string
...@@ -706,18 +706,18 @@ namespace std ...@@ -706,18 +706,18 @@ namespace std
*/ */
template<class _CharT, class _Traits, class _Alloc> template<class _CharT, class _Traits, class _Alloc>
explicit bitset(const basic_string<_CharT, _Traits, _Alloc>& __s, 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"); __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); basic_string<_CharT, _Traits, _Alloc>::npos);
} }
/** /**
* @brief Use a subset of a string. * @brief Use a subset of a string.
* @param s A string of '0' and '1' characters. * @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. * @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::out_of_range If @a pos is bigger the size of @a s.
* @throw std::invalid_argument If a character appears in the string * @throw std::invalid_argument If a character appears in the string
...@@ -725,11 +725,11 @@ namespace std ...@@ -725,11 +725,11 @@ namespace std
*/ */
template<class _CharT, class _Traits, class _Alloc> template<class _CharT, class _Traits, class _Alloc>
bitset(const basic_string<_CharT, _Traits, _Alloc>& __s, 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"); __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: // 23.3.5.2 bitset operations:
...@@ -765,16 +765,16 @@ namespace std ...@@ -765,16 +765,16 @@ namespace std
//@{ //@{
/** /**
* @brief Operations on bitsets. * @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. * These should be self-explanatory.
*/ */
bitset<_Nb>& 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(); this->_M_do_sanitize();
} }
else else
...@@ -783,11 +783,11 @@ namespace std ...@@ -783,11 +783,11 @@ namespace std
} }
bitset<_Nb>& 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(); this->_M_do_sanitize();
} }
else else
...@@ -855,16 +855,16 @@ namespace std ...@@ -855,16 +855,16 @@ namespace std
/** /**
* @brief Sets a given bit to a particular value. * @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. * @param val Either true or false, defaults to true.
* @throw std::out_of_range If @a pos is bigger the size of the %set. * @throw std::out_of_range If @a pos is bigger the size of the %set.
*/ */
bitset<_Nb>& 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")); __throw_out_of_range(__N("bitset::set"));
return _Unchecked_set(__pos, __val); return _Unchecked_set(__position, __val);
} }
/** /**
...@@ -879,17 +879,17 @@ namespace std ...@@ -879,17 +879,17 @@ namespace std
/** /**
* @brief Sets a given bit to false. * @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. * @throw std::out_of_range If @a pos is bigger the size of the %set.
* *
* Same as writing @c set(pos,false). * Same as writing @c set(pos,false).
*/ */
bitset<_Nb>& bitset<_Nb>&
reset(size_t __pos) reset(size_t __position)
{ {
if (__pos >= _Nb) if (__position >= _Nb)
__throw_out_of_range(__N("bitset::reset")); __throw_out_of_range(__N("bitset::reset"));
return _Unchecked_reset(__pos); return _Unchecked_reset(__position);
} }
/** /**
...@@ -905,15 +905,15 @@ namespace std ...@@ -905,15 +905,15 @@ namespace std
/** /**
* @brief Toggles a given bit to its opposite value. * @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. * @throw std::out_of_range If @a pos is bigger the size of the %set.
*/ */
bitset<_Nb>& bitset<_Nb>&
flip(size_t __pos) flip(size_t __position)
{ {
if (__pos >= _Nb) if (__position >= _Nb)
__throw_out_of_range(__N("bitset::flip")); __throw_out_of_range(__N("bitset::flip"));
return _Unchecked_flip(__pos); return _Unchecked_flip(__position);
} }
/// See the no-argument flip(). /// See the no-argument flip().
...@@ -923,7 +923,7 @@ namespace std ...@@ -923,7 +923,7 @@ namespace std
//@{ //@{
/** /**
* @brief Array-indexing support. * @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 * @return A bool for a 'const %bitset'. For non-const bitsets, an
* instance of the reference proxy class. * instance of the reference proxy class.
* @note These operators do no range checking and throw no exceptions, * @note These operators do no range checking and throw no exceptions,
...@@ -938,10 +938,10 @@ namespace std ...@@ -938,10 +938,10 @@ namespace std
* @endif * @endif
*/ */
reference reference
operator[](size_t __pos) { return reference(*this,__pos); } operator[](size_t __position) { return reference(*this,__position); }
bool 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 ...@@ -1007,16 +1007,16 @@ namespace std
/** /**
* @brief Tests the value of a bit. * @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. * @return The value at @a pos.
* @throw std::out_of_range If @a pos is bigger the size of the %set. * @throw std::out_of_range If @a pos is bigger the size of the %set.
*/ */
bool bool
test(size_t __pos) const test(size_t __position) const
{ {
if (__pos >= _Nb) if (__position >= _Nb)
__throw_out_of_range(__N("bitset::test")); __throw_out_of_range(__N("bitset::test"));
return _Unchecked_test(__pos); return _Unchecked_test(__position);
} }
/** /**
...@@ -1036,12 +1036,12 @@ namespace std ...@@ -1036,12 +1036,12 @@ namespace std
//@{ //@{
/// Self-explanatory. /// Self-explanatory.
bitset<_Nb> bitset<_Nb>
operator<<(size_t __pos) const operator<<(size_t __position) const
{ return bitset<_Nb>(*this) <<= __pos; } { return bitset<_Nb>(*this) <<= __position; }
bitset<_Nb> bitset<_Nb>
operator>>(size_t __pos) const operator>>(size_t __position) const
{ return bitset<_Nb>(*this) >>= __pos; } { return bitset<_Nb>(*this) >>= __position; }
//@} //@}
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment