summaryrefslogtreecommitdiff
path: root/libstdc++-v3/include/bits
diff options
context:
space:
mode:
authorbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2010-02-06 06:14:18 +0000
committerbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2010-02-06 06:14:18 +0000
commit7b919065100b9d5597126afce413f6caa6277704 (patch)
treea94dfc952249fa7f444964aecc1627d83d20bc9b /libstdc++-v3/include/bits
parent43dcffc1d84bb19ceb32c25715b60a6864c67220 (diff)
downloadgcc-7b919065100b9d5597126afce413f6caa6277704.tar.gz
2010-02-06 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 156526 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@156537 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/include/bits')
-rw-r--r--libstdc++-v3/include/bits/allocator.h6
-rw-r--r--libstdc++-v3/include/bits/basic_ios.h8
-rw-r--r--libstdc++-v3/include/bits/basic_string.h30
-rw-r--r--libstdc++-v3/include/bits/char_traits.h6
-rw-r--r--libstdc++-v3/include/bits/cpp_type_traits.h6
-rw-r--r--libstdc++-v3/include/bits/forward_list.h43
-rw-r--r--libstdc++-v3/include/bits/forward_list.tcc37
-rw-r--r--libstdc++-v3/include/bits/ios_base.h14
-rw-r--r--libstdc++-v3/include/bits/locale_classes.h10
-rw-r--r--libstdc++-v3/include/bits/locale_facets.h4
-rw-r--r--libstdc++-v3/include/bits/locale_facets_nonio.h71
-rw-r--r--libstdc++-v3/include/bits/random.h129
-rw-r--r--libstdc++-v3/include/bits/random.tcc157
-rw-r--r--libstdc++-v3/include/bits/stl_algo.h31
-rw-r--r--libstdc++-v3/include/bits/stl_algobase.h93
-rw-r--r--libstdc++-v3/include/bits/stl_deque.h35
-rw-r--r--libstdc++-v3/include/bits/stl_function.h6
-rw-r--r--libstdc++-v3/include/bits/stl_iterator.h24
-rw-r--r--libstdc++-v3/include/bits/stl_iterator_base_funcs.h4
-rw-r--r--libstdc++-v3/include/bits/stl_iterator_base_types.h4
-rw-r--r--libstdc++-v3/include/bits/stl_map.h2
-rw-r--r--libstdc++-v3/include/bits/stl_multimap.h2
-rw-r--r--libstdc++-v3/include/bits/stl_multiset.h4
-rw-r--r--libstdc++-v3/include/bits/stl_queue.h4
-rw-r--r--libstdc++-v3/include/bits/stl_set.h2
-rw-r--r--libstdc++-v3/include/bits/stl_stack.h4
-rw-r--r--libstdc++-v3/include/bits/stl_tempbuf.h6
27 files changed, 415 insertions, 327 deletions
diff --git a/libstdc++-v3/include/bits/allocator.h b/libstdc++-v3/include/bits/allocator.h
index 283224d6675..ddf48db4cc2 100644
--- a/libstdc++-v3/include/bits/allocator.h
+++ b/libstdc++-v3/include/bits/allocator.h
@@ -76,7 +76,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
};
/**
- * @brief The "standard" allocator, as per [20.4].
+ * @brief The @a standard allocator, as per [20.4].
* @ingroup allocators
*
* Further details:
@@ -194,9 +194,9 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
static void
_S_do_it(_Tp& __v)
{
- try
+ __try
{ _Tp(__v).swap(__v); }
- catch(...) { }
+ __catch(...) { }
}
};
#endif
diff --git a/libstdc++-v3/include/bits/basic_ios.h b/libstdc++-v3/include/bits/basic_ios.h
index ee1b64650d7..ba06316b8d1 100644
--- a/libstdc++-v3/include/bits/basic_ios.h
+++ b/libstdc++-v3/include/bits/basic_ios.h
@@ -1,7 +1,7 @@
// Iostreams base classes -*- C++ -*-
// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
-// 2006, 2007, 2008, 2009
+// 2006, 2007, 2008, 2009, 2010
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -106,7 +106,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* @brief The quick-and-easy status check.
*
* This allows you to write constructs such as
- * "if (!a_stream) ..." and "while (a_stream) ..."
+ * <code>if (!a_stream) ...</code> and <code>while (a_stream) ...</code>
*/
operator void*() const
{ return this->fail() ? 0 : const_cast<basic_ios*>(this); }
@@ -351,7 +351,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
copyfmt(const basic_ios& __rhs);
/**
- * @brief Retrieves the "empty" character.
+ * @brief Retrieves the @a empty character.
* @return The current fill character.
*
* It defaults to a space (' ') in the current locale.
@@ -368,7 +368,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
}
/**
- * @brief Sets a new "empty" character.
+ * @brief Sets a new @a empty character.
* @param ch The new character.
* @return The previous fill character.
*
diff --git a/libstdc++-v3/include/bits/basic_string.h b/libstdc++-v3/include/bits/basic_string.h
index a549cf76063..b0f18101a76 100644
--- a/libstdc++-v3/include/bits/basic_string.h
+++ b/libstdc++-v3/include/bits/basic_string.h
@@ -79,7 +79,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* This approach has the enormous advantage that a string object
* requires only one allocation. All the ugliness is confined
* within a single pair of inline functions, which each compile to
- * a single "add" instruction: _Rep::_M_data(), and
+ * a single @a add instruction: _Rep::_M_data(), and
* string::_M_rep(); and the allocation function which gets a
* block of raw bytes and with room enough and constructs a _Rep
* object at the front.
@@ -91,7 +91,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* string length.)
*
* Note that the _Rep object is a POD so that you can have a
- * static "empty string" _Rep object already "constructed" before
+ * static <em>empty string</em> _Rep object already @a constructed before
* static constructors have run. The reference-count encoding is
* chosen so that a 0 indicates one reference, so you never try to
* destroy the empty-string _Rep object.
@@ -462,8 +462,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* @param n Number of characters to copy.
* @param a Allocator to use (default is default allocator).
*
- * NB: @a s must have at least @a n characters, '\\0' has no special
- * meaning.
+ * NB: @a s must have at least @a n characters, &apos;\\0&apos;
+ * has no special meaning.
*/
basic_string(const _CharT* __s, size_type __n,
const _Alloc& __a = _Alloc());
@@ -743,9 +743,9 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
void
shrink_to_fit()
{
- try
+ __try
{ reserve(0); }
- catch(...)
+ __catch(...)
{ }
}
#endif
@@ -786,7 +786,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
{ _M_mutate(0, this->size(), 0); }
/**
- * Returns true if the %string is empty. Equivalent to *this == "".
+ * Returns true if the %string is empty. Equivalent to
+ * <code>*this == ""</code>.
*/
bool
empty() const
@@ -2241,8 +2242,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* result of the comparison is nonzero returns it, otherwise the shorter
* one is ordered first.
*
- * NB: s must have at least n2 characters, '\\0' has no special
- * meaning.
+ * NB: s must have at least n2 characters, &apos;\\0&apos; has
+ * no special meaning.
*/
int
compare(size_type __pos, size_type __n1, const _CharT* __s,
@@ -2627,11 +2628,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* @param str Buffer to store into.
* @return Reference to the input stream.
*
- * Stores characters from is into @a str until '\n' is found, the end of
- * the stream is encountered, or str.max_size() is reached. If is.width()
- * is non-zero, that is the limit on the number of characters stored into
- * @a str. Any previous contents of @a str are erased. If end of line was
- * encountered, it is extracted but not stored into @a str.
+ * Stores characters from is into @a str until &apos;\n&apos; is
+ * found, the end of the stream is encountered, or str.max_size()
+ * is reached. If is.width() is non-zero, that is the limit on the
+ * number of characters stored into @a str. Any previous contents
+ * of @a str are erased. If end of line was encountered, it is
+ * extracted but not stored into @a str.
*/
template<typename _CharT, typename _Traits, typename _Alloc>
inline basic_istream<_CharT, _Traits>&
diff --git a/libstdc++-v3/include/bits/char_traits.h b/libstdc++-v3/include/bits/char_traits.h
index 5e52c7537d1..412e75a2ec0 100644
--- a/libstdc++-v3/include/bits/char_traits.h
+++ b/libstdc++-v3/include/bits/char_traits.h
@@ -1,7 +1,7 @@
// Character Traits for use by standard string and iostream -*- C++ -*-
// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
-// 2006, 2007, 2008, 2009
+// 2006, 2007, 2008, 2009, 2010
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -83,7 +83,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
* namespace __gnu_cxx may be.
*
* See http://gcc.gnu.org/onlinedocs/libstdc++/manual/bk01pt05ch13s03.html
- * for advice on how to make use of this class for "unusual" character
+ * for advice on how to make use of this class for @a unusual character
* types. Also, check out include/ext/pod_char_traits.h.
*/
template<typename _CharT>
@@ -224,7 +224,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* appropriate definition by specializing __gnu_cxx::char_traits.
*
* See http://gcc.gnu.org/onlinedocs/libstdc++/manual/bk01pt05ch13s03.html
- * for advice on how to make use of this class for "unusual" character
+ * for advice on how to make use of this class for @a unusual character
* types. Also, check out include/ext/pod_char_traits.h.
*/
template<class _CharT>
diff --git a/libstdc++-v3/include/bits/cpp_type_traits.h b/libstdc++-v3/include/bits/cpp_type_traits.h
index afb0049b554..0d7b9ff09fc 100644
--- a/libstdc++-v3/include/bits/cpp_type_traits.h
+++ b/libstdc++-v3/include/bits/cpp_type_traits.h
@@ -1,6 +1,6 @@
// The -*- C++ -*- type traits classes for internal use in libstdc++
-// Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009
+// Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -136,8 +136,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
};
// Thirteen specializations (yes there are eleven standard integer
- // types; 'long long' and 'unsigned long long' are supported as
- // extensions)
+ // types; <em>long long</em> and <em>unsigned long long</em> are
+ // supported as extensions)
template<>
struct __is_integer<bool>
{
diff --git a/libstdc++-v3/include/bits/forward_list.h b/libstdc++-v3/include/bits/forward_list.h
index 10af47e74e1..d7005e828c5 100644
--- a/libstdc++-v3/include/bits/forward_list.h
+++ b/libstdc++-v3/include/bits/forward_list.h
@@ -1,6 +1,6 @@
// <forward_list.h> -*- C++ -*-
-// Copyright (C) 2008, 2009 Free Software Foundation, Inc.
+// Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -442,17 +442,14 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
{ }
/**
- * @brief Creates a %forward_list with copies of the default element
- * type.
+ * @brief Creates a %forward_list with default constructed elements.
* @param n The number of elements to initially create.
*
- * This constructor fills the %forward_list with @a n copies of
- * the default value.
+ * This constructor creates the %forward_list with @a n default
+ * constructed elements.
*/
explicit
- forward_list(size_type __n)
- : _Base()
- { _M_fill_initialize(__n, value_type()); }
+ forward_list(size_type __n);
/**
* @brief Creates a %forward_list with copies of an exemplar element.
@@ -497,7 +494,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* object used by @a list.
*/
forward_list(const forward_list& __list)
- : _Base(__list.get_allocator())
+ : _Base(__list._M_get_Node_allocator())
{ _M_initialize_dispatch(__list.begin(), __list.end(), __false_type()); }
/**
@@ -859,6 +856,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* @param pos An iterator into the %forward_list.
* @param n Number of elements to be inserted.
* @param val Data to be inserted.
+ * @return pos.
*
* This function will insert a specified number of copies of the
* given data after the location specified by @a pos.
@@ -866,11 +864,13 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* This operation is linear in the number of elements inserted and
* does not invalidate iterators and references.
*/
- void
+ iterator
insert_after(const_iterator __pos, size_type __n, const _Tp& __val)
{
- forward_list __tmp(__n, __val, this->get_allocator());
+ forward_list __tmp(__n, __val, this->_M_get_Node_allocator());
splice_after(__pos, std::move(__tmp));
+ return iterator(__const_pointer_cast<typename _Node_base::_Pointer>
+ (__pos._M_node));
}
/**
@@ -878,6 +878,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* @param position An iterator into the %forward_list.
* @param first An input iterator.
* @param last An input iterator.
+ * @return pos.
*
* This function will insert copies of the data in the range [@a
* first,@a last) into the %forward_list after the location specified
@@ -887,12 +888,14 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* does not invalidate iterators and references.
*/
template<typename _InputIterator>
- void
+ iterator
insert_after(const_iterator __pos,
_InputIterator __first, _InputIterator __last)
{
- forward_list __tmp(__first, __last, this->get_allocator());
+ forward_list __tmp(__first, __last, this->_M_get_Node_allocator());
splice_after(__pos, std::move(__tmp));
+ return iterator(__const_pointer_cast<typename _Node_base::_Pointer>
+ (__pos._M_node));
}
/**
@@ -900,6 +903,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* %forward_list after the specified iterator.
* @param pos An iterator into the %forward_list.
* @param il An initializer_list of value_type.
+ * @return pos.
*
* This function will insert copies of the data in the
* initializer_list @a il into the %forward_list before the location
@@ -908,11 +912,13 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* This operation is linear in the number of elements inserted and
* does not invalidate iterators and references.
*/
- void
+ iterator
insert_after(const_iterator __pos, std::initializer_list<_Tp> __il)
{
- forward_list __tmp(__il, this->get_allocator());
+ forward_list __tmp(__il, this->_M_get_Node_allocator());
splice_after(__pos, std::move(__tmp));
+ return iterator(__const_pointer_cast<typename _Node_base::_Pointer>
+ (__pos._M_node));
}
/**
@@ -984,12 +990,11 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* This function will %resize the %forward_list to the specified
* number of elements. If the number is smaller than the
* %forward_list's current size the %forward_list is truncated,
- * otherwise the %forward_list is extended and new elements are
- * populated with given data.
+ * otherwise the %forward_list is extended and the new elements
+ * are default constructed.
*/
void
- resize(size_type __sz)
- { resize(__sz, _Tp()); }
+ resize(size_type __sz);
/**
* @brief Resizes the %forward_list to the specified number of
diff --git a/libstdc++-v3/include/bits/forward_list.tcc b/libstdc++-v3/include/bits/forward_list.tcc
index 1575cabf1f2..685e533c385 100644
--- a/libstdc++-v3/include/bits/forward_list.tcc
+++ b/libstdc++-v3/include/bits/forward_list.tcc
@@ -1,6 +1,6 @@
// <forward_list.tcc> -*- C++ -*-
-// Copyright (C) 2008, 2009 Free Software Foundation, Inc.
+// Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -175,6 +175,19 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
}
template<typename _Tp, typename _Alloc>
+ forward_list<_Tp, _Alloc>::
+ forward_list(size_type __n)
+ : _Base()
+ {
+ typename _Node_base::_Pointer __to = &this->_M_impl._M_head;
+ for (; __n > 0; --__n)
+ {
+ __to->_M_next = this->_M_create_node();
+ __to = __to->_M_next;
+ }
+ }
+
+ template<typename _Tp, typename _Alloc>
forward_list<_Tp, _Alloc>&
forward_list<_Tp, _Alloc>::
operator=(const forward_list& __list)
@@ -204,6 +217,28 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
template<typename _Tp, typename _Alloc>
void
forward_list<_Tp, _Alloc>::
+ resize(size_type __sz)
+ {
+ iterator __k = before_begin();
+
+ size_type __len = 0;
+ while (__k._M_next() != end() && __len < __sz)
+ {
+ ++__k;
+ ++__len;
+ }
+ if (__len == __sz)
+ erase_after(__k, end());
+ else
+ {
+ forward_list __tmp(__sz - __len);
+ splice_after(__k, std::move(__tmp));
+ }
+ }
+
+ template<typename _Tp, typename _Alloc>
+ void
+ forward_list<_Tp, _Alloc>::
resize(size_type __sz, value_type __val)
{
iterator __k = before_begin();
diff --git a/libstdc++-v3/include/bits/ios_base.h b/libstdc++-v3/include/bits/ios_base.h
index 2badd4c4c1c..f1be6aeb2e9 100644
--- a/libstdc++-v3/include/bits/ios_base.h
+++ b/libstdc++-v3/include/bits/ios_base.h
@@ -1,7 +1,7 @@
// Iostreams base classes -*- C++ -*-
// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
-// 2006, 2007, 2008, 2009
+// 2006, 2007, 2008, 2009, 2010
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -238,7 +238,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
/**
* @brief This is a bitmask type.
*
- * @c "_Ios_Fmtflags" is implementation-defined, but it is valid to
+ * @c @a _Ios_Fmtflags is implementation-defined, but it is valid to
* perform bitwise operations on these values and expect the Right
* Thing to happen. Defined objects of type fmtflags are:
* - boolalpha
@@ -327,7 +327,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
/**
* @brief This is a bitmask type.
*
- * @c "_Ios_Iostate" is implementation-defined, but it is valid to
+ * @c @a _Ios_Iostate is implementation-defined, but it is valid to
* perform bitwise operations on these values and expect the Right
* Thing to happen. Defined objects of type iostate are:
* - badbit
@@ -356,7 +356,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
/**
* @brief This is a bitmask type.
*
- * @c "_Ios_Openmode" is implementation-defined, but it is valid to
+ * @c @a _Ios_Openmode is implementation-defined, but it is valid to
* perform bitwise operations on these values and expect the Right
* Thing to happen. Defined objects of type openmode are:
* - app
@@ -392,7 +392,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
/**
* @brief This is an enumerated type.
*
- * @c "_Ios_Seekdir" is implementation-defined. Defined values
+ * @c @a _Ios_Seekdir is implementation-defined. Defined values
* of type seekdir are:
* - beg
* - cur, equivalent to @c SEEK_CUR in the C standard library.
@@ -618,7 +618,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* @brief Flags access.
* @return The precision to generate on certain output operations.
*
- * Be careful if you try to give a definition of "precision" here; see
+ * Be careful if you try to give a definition of @a precision here; see
* DR 189.
*/
streamsize
@@ -642,7 +642,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* @brief Flags access.
* @return The minimum field width to generate on output operations.
*
- * "Minimum field width" refers to the number of characters.
+ * <em>Minimum field width</em> refers to the number of characters.
*/
streamsize
width() const
diff --git a/libstdc++-v3/include/bits/locale_classes.h b/libstdc++-v3/include/bits/locale_classes.h
index 7ae9c53bc6a..d966a3119bc 100644
--- a/libstdc++-v3/include/bits/locale_classes.h
+++ b/libstdc++-v3/include/bits/locale_classes.h
@@ -1,7 +1,7 @@
// Locale support -*- C++ -*-
// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
-// 2006, 2007, 2008, 2009
+// 2006, 2007, 2008, 2009, 2010
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -111,7 +111,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* @brief Default constructor.
*
* Constructs a copy of the global locale. If no locale has been
- * explicitly set, this is the "C" locale.
+ * explicitly set, this is the C locale.
*/
locale() throw();
@@ -268,7 +268,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
global(const locale&);
/**
- * @brief Return reference to the "C" locale.
+ * @brief Return reference to the C locale.
*/
static const locale&
classic();
@@ -641,7 +641,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* This is a constructor for use by the library itself to set up new
* locales.
*
- * @param cloc The "C" locale.
+ * @param cloc The C locale.
* @param refs Passed to the base facet class.
*/
explicit
@@ -671,7 +671,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
*
* This function is a wrapper for strxfrm functionality. It takes the
* input string and returns a modified string that can be directly
- * compared to other transformed strings. In the "C" locale, this
+ * compared to other transformed strings. In the C locale, this
* function just returns a copy of the input string. In some other
* locales, it may replace two chars with one, change a char for
* another, etc. It does so by returning collate::do_transform().
diff --git a/libstdc++-v3/include/bits/locale_facets.h b/libstdc++-v3/include/bits/locale_facets.h
index 5dec0f49cbe..b3f2139ed40 100644
--- a/libstdc++-v3/include/bits/locale_facets.h
+++ b/libstdc++-v3/include/bits/locale_facets.h
@@ -1,7 +1,7 @@
// Locale support -*- C++ -*-
// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
-// 2006, 2007, 2008, 2009
+// 2006, 2007, 2008, 2009, 2010
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -1680,7 +1680,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* This is a constructor for use by the library itself to set up new
* locales.
*
- * @param cloc The "C" locale.
+ * @param cloc The C locale.
* @param refs Refcount to pass to the base class.
*/
explicit
diff --git a/libstdc++-v3/include/bits/locale_facets_nonio.h b/libstdc++-v3/include/bits/locale_facets_nonio.h
index 525a53326a9..b1d4c6049f5 100644
--- a/libstdc++-v3/include/bits/locale_facets_nonio.h
+++ b/libstdc++-v3/include/bits/locale_facets_nonio.h
@@ -200,7 +200,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* This is a constructor for use by the library itself to set up new
* locales.
*
- * @param cloc The "C" locale.
+ * @param cloc The C locale.
* @param s The name of a locale.
* @param refs Passed to the base facet class.
*/
@@ -387,8 +387,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* @brief Return preferred order of month, day, and year.
*
* This function returns an enum from timebase::dateorder giving the
- * preferred ordering if the format "x" given to time_put::put() only
- * uses month, day, and year. If the format "x" for the associated
+ * preferred ordering if the format @a x given to time_put::put() only
+ * uses month, day, and year. If the format @a x for the associated
* locale uses other fields, this function returns
* timebase::dateorder::noorder.
*
@@ -403,11 +403,11 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
/**
* @brief Parse input time string.
*
- * This function parses a time according to the format "x" and puts the
+ * This function parses a time according to the format @a x and puts the
* results into a user-supplied struct tm. The result is returned by
* calling time_get::do_get_time().
*
- * If there is a valid time string according to format "x", @a tm will
+ * If there is a valid time string according to format @a x, @a tm will
* be filled in accordingly and the returned iterator will point to the
* first character beyond the time string. If an error occurs before
* the end, err |= ios_base::failbit. If parsing reads all the
@@ -428,11 +428,11 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
/**
* @brief Parse input date string.
*
- * This function parses a date according to the format "X" and puts the
+ * This function parses a date according to the format @a X and puts the
* results into a user-supplied struct tm. The result is returned by
* calling time_get::do_get_date().
*
- * If there is a valid date string according to format "X", @a tm will
+ * If there is a valid date string according to format @a X, @a tm will
* be filled in accordingly and the returned iterator will point to the
* first character beyond the date string. If an error occurs before
* the end, err |= ios_base::failbit. If parsing reads all the
@@ -542,7 +542,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* @brief Return preferred order of month, day, and year.
*
* This function returns an enum from timebase::dateorder giving the
- * preferred ordering if the format "x" given to time_put::put() only
+ * preferred ordering if the format @a x given to time_put::put() only
* uses month, day, and year. This function is a hook for derived
* classes to change the value returned.
*
@@ -554,7 +554,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
/**
* @brief Parse input time string.
*
- * This function parses a time according to the format "x" and puts the
+ * This function parses a time according to the format @a x and puts the
* results into a user-supplied struct tm. This function is a hook for
* derived classes to change the value returned. @see get_time() for
* details.
@@ -573,7 +573,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
/**
* @brief Parse input date string.
*
- * This function parses a date according to the format "X" and puts the
+ * This function parses a date according to the format @a X and puts the
* results into a user-supplied struct tm. This function is a hook for
* derived classes to change the value returned. @see get_date() for
* details.
@@ -972,7 +972,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* This is a constructor for use by the library itself to set up new
* locales.
*
- * @param cloc The "C" locale.
+ * @param cloc The C locale.
* @param s The name of a locale.
* @param refs Passed to the base facet class.
*/
@@ -1022,10 +1022,11 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* string are required to group a number, the last char is used
* repeatedly.
*
- * For example, if the grouping() returns "\003\002" and is applied to
- * the number 123456789, this corresponds to 12,34,56,789. Note that
- * if the string was "32", this would put more than 50 digits into the
- * least significant group if the character set is ASCII.
+ * For example, if the grouping() returns <code>\003\002</code>
+ * and is applied to the number 123456789, this corresponds to
+ * 12,34,56,789. Note that if the string was <code>32</code>, this would
+ * put more than 50 digits into the least significant group if
+ * the character set is ASCII.
*
* The string is returned by calling
* moneypunct<char_type>::do_grouping().
@@ -1124,9 +1125,10 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* present.
*
* For example, for the US locale and pos_format() pattern
- * {symbol,sign,value,none}, curr_symbol() == '$' positive_sign() ==
- * '+', and value 10.01, and options set to force the symbol, the
- * corresponding string is "$+10.01".
+ * {symbol,sign,value,none}, curr_symbol() == &apos;$&apos;
+ * positive_sign() == &apos;+&apos;, and value 10.01, and
+ * options set to force the symbol, the corresponding string is
+ * <code>$+10.01</code>.
*
* @return Pattern for money values.
*/
@@ -1412,10 +1414,11 @@ _GLIBCXX_BEGIN_LDBL_NAMESPACE
/**
* @brief Read and parse a monetary value.
*
- * This function reads characters from @a s, interprets them as a
- * monetary value according to moneypunct and ctype facets retrieved
- * from io.getloc(), and returns the result in @a digits. For example,
- * the string $10.01 in a US locale would store "1001" in @a digits.
+ * This function reads characters from @a s, interprets them as
+ * a monetary value according to moneypunct and ctype facets
+ * retrieved from io.getloc(), and returns the result in @a
+ * digits. For example, the string $10.01 in a US locale would
+ * store <code>1001</code> in @a digits.
*
* Any characters not part of a valid money amount are not consumed.
*
@@ -1531,7 +1534,7 @@ _GLIBCXX_BEGIN_LDBL_NAMESPACE
* This function formats @a units as a monetary value according to
* moneypunct and ctype facets retrieved from io.getloc(), and writes
* the resulting characters to @a s. For example, the value 1001 in a
- * US locale would write "$10.01" to @a s.
+ * US locale would write <code>$10.01</code> to @a s.
*
* This function works by returning the result of do_put().
*
@@ -1550,10 +1553,11 @@ _GLIBCXX_BEGIN_LDBL_NAMESPACE
/**
* @brief Format and output a monetary value.
*
- * This function formats @a digits as a monetary value according to
- * moneypunct and ctype facets retrieved from io.getloc(), and writes
- * the resulting characters to @a s. For example, the string "1001" in
- * a US locale would write "$10.01" to @a s.
+ * This function formats @a digits as a monetary value
+ * according to moneypunct and ctype facets retrieved from
+ * io.getloc(), and writes the resulting characters to @a s.
+ * For example, the string <code>1001</code> in a US locale
+ * would write <code>$10.01</code> to @a s.
*
* This function works by returning the result of do_put().
*
@@ -1580,7 +1584,7 @@ _GLIBCXX_BEGIN_LDBL_NAMESPACE
* This function formats @a units as a monetary value according to
* moneypunct and ctype facets retrieved from io.getloc(), and writes
* the resulting characters to @a s. For example, the value 1001 in a
- * US locale would write "$10.01" to @a s.
+ * US locale would write <code>$10.01</code> to @a s.
*
* This function is a hook for derived classes to change the value
* returned. @see put().
@@ -1606,10 +1610,11 @@ _GLIBCXX_BEGIN_LDBL_NAMESPACE
/**
* @brief Format and output a monetary value.
*
- * This function formats @a digits as a monetary value according to
- * moneypunct and ctype facets retrieved from io.getloc(), and writes
- * the resulting characters to @a s. For example, the string "1001" in
- * a US locale would write "$10.01" to @a s.
+ * This function formats @a digits as a monetary value
+ * according to moneypunct and ctype facets retrieved from
+ * io.getloc(), and writes the resulting characters to @a s.
+ * For example, the string <code>1001</code> in a US locale
+ * would write <code>$10.01</code> to @a s.
*
* This function is a hook for derived classes to change the value
* returned. @see put().
@@ -1709,7 +1714,7 @@ _GLIBCXX_END_LDBL_NAMESPACE
* This is a constructor for use by the library itself to set up new
* locales.
*
- * @param cloc The "C" locale.
+ * @param cloc The C locale.
* @param s The name of a locale.
* @param refs Refcount to pass to the base class.
*/
diff --git a/libstdc++-v3/include/bits/random.h b/libstdc++-v3/include/bits/random.h
index c86eb9947f8..3a53fe30d21 100644
--- a/libstdc++-v3/include/bits/random.h
+++ b/libstdc++-v3/include/bits/random.h
@@ -1,6 +1,6 @@
// random number generation -*- C++ -*-
-// Copyright (C) 2009 Free Software Foundation, Inc.
+// Copyright (C) 2009, 2010 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -50,8 +50,6 @@ namespace std
_RealType
generate_canonical(_UniformRandomNumberGenerator& __g);
- class seed_seq;
-
/*
* Implementation-space details.
*/
@@ -179,7 +177,7 @@ namespace std
*/
explicit
linear_congruential_engine(result_type __s = default_seed)
- { this->seed(__s); }
+ { seed(__s); }
/**
* @brief Constructs a %linear_congruential_engine random number
@@ -187,9 +185,11 @@ namespace std
*
* @param __q the seed sequence.
*/
- explicit
- linear_congruential_engine(seed_seq& __q)
- { this->seed(__q); }
+ template<typename _Sseq, typename
+ = typename std::enable_if<std::is_class<_Sseq>::value>::type>
+ explicit
+ linear_congruential_engine(_Sseq& __q)
+ { seed<_Sseq>(__q); }
/**
* @brief Reseeds the %linear_congruential_engine random number generator
@@ -207,8 +207,10 @@ namespace std
*
* @param __q the seed sequence.
*/
- void
- seed(seed_seq& __q);
+ template<typename _Sseq, typename
+ = typename std::enable_if<std::is_class<_Sseq>::value>::type>
+ void
+ seed(_Sseq& __q);
/**
* @brief Gets the smallest possible value in the output range.
@@ -398,15 +400,19 @@ namespace std
*
* @param __q the seed sequence.
*/
- explicit
- mersenne_twister_engine(seed_seq& __q)
- { seed(__q); }
+ template<typename _Sseq, typename
+ = typename std::enable_if<std::is_class<_Sseq>::value>::type>
+ explicit
+ mersenne_twister_engine(_Sseq& __q)
+ { seed<_Sseq>(__q); }
void
seed(result_type __sd = default_seed);
- void
- seed(seed_seq& __q);
+ template<typename _Sseq, typename
+ = typename std::enable_if<std::is_class<_Sseq>::value>::type>
+ void
+ seed(_Sseq& __q);
/**
* @brief Gets the smallest possible value in the output range.
@@ -557,7 +563,7 @@ namespace std
*/
explicit
subtract_with_carry_engine(result_type __sd = default_seed)
- { this->seed(__sd); }
+ { seed(__sd); }
/**
* @brief Constructs a %subtract_with_carry_engine random number engine
@@ -565,9 +571,11 @@ namespace std
*
* @param __q the seed sequence.
*/
- explicit
- subtract_with_carry_engine(seed_seq& __q)
- { this->seed(__q); }
+ template<typename _Sseq, typename
+ = typename std::enable_if<std::is_class<_Sseq>::value>::type>
+ explicit
+ subtract_with_carry_engine(_Sseq& __q)
+ { seed<_Sseq>(__q); }
/**
* @brief Seeds the initial state @f$ x_0 @f$ of the random number
@@ -588,8 +596,10 @@ namespace std
* @brief Seeds the initial state @f$ x_0 @f$ of the
* % subtract_with_carry_engine random number generator.
*/
- void
- seed(seed_seq& __q);
+ template<typename _Sseq, typename
+ = typename std::enable_if<std::is_class<_Sseq>::value>::type>
+ void
+ seed(_Sseq& __q);
/**
* @brief Gets the inclusive minimum value of the range of random
@@ -670,7 +680,8 @@ namespace std
* @p __is.
*
* @param __is An input stream.
- * @param __x A % subtract_with_carry_engine random number generator engine.
+ * @param __x A % subtract_with_carry_engine random number generator
+ * engine.
*
* @returns The input stream with the state of @p __x extracted or in
* an error state.
@@ -751,10 +762,14 @@ namespace std
*
* @param __q A seed sequence.
*/
- explicit
- discard_block_engine(seed_seq& __q)
- : _M_b(__q), _M_n(0)
- { }
+ template<typename _Sseq, typename
+ = typename std::enable_if<std::is_class<_Sseq>::value
+ && !std::is_same<_Sseq, _RandomNumberEngine>
+ ::value>::type>
+ explicit
+ discard_block_engine(_Sseq& __q)
+ : _M_b(__q), _M_n(0)
+ { }
/**
* @brief Reseeds the %discard_block_engine object with the default
@@ -783,12 +798,14 @@ namespace std
* sequence.
* @param __q A seed generator function.
*/
- void
- seed(seed_seq& __q)
- {
- _M_b.seed(__q);
- _M_n = 0;
- }
+ template<typename _Sseq, typename
+ = typename std::enable_if<std::is_class<_Sseq>::value>::type>
+ void
+ seed(_Sseq& __q)
+ {
+ _M_b.seed<_Sseq>(__q);
+ _M_n = 0;
+ }
/**
* @brief Gets a const reference to the underlying generator engine
@@ -949,10 +966,14 @@ namespace std
*
* @param __q A seed sequence.
*/
- explicit
- independent_bits_engine(seed_seq& __q)
- : _M_b(__q)
- { }
+ template<typename _Sseq, typename
+ = typename std::enable_if<std::is_class<_Sseq>::value
+ && !std::is_same<_Sseq, _RandomNumberEngine>
+ ::value>::type>
+ explicit
+ independent_bits_engine(_Sseq& __q)
+ : _M_b(__q)
+ { }
/**
* @brief Reseeds the %independent_bits_engine object with the default
@@ -975,9 +996,11 @@ namespace std
* seed sequence.
* @param __q A seed generator function.
*/
- void
- seed(seed_seq& __q)
- { _M_b.seed(__q); }
+ template<typename _Sseq, typename
+ = typename std::enable_if<std::is_class<_Sseq>::value>::type>
+ void
+ seed(_Sseq& __q)
+ { _M_b.seed<_Sseq>(__q); }
/**
* @brief Gets a const reference to the underlying generator engine
@@ -1150,10 +1173,14 @@ namespace std
*
* @param __q A seed sequence.
*/
- explicit
- shuffle_order_engine(seed_seq& __q)
- : _M_b(__q)
- { _M_initialize(); }
+ template<typename _Sseq, typename
+ = typename std::enable_if<std::is_class<_Sseq>::value
+ && !std::is_same<_Sseq, _RandomNumberEngine>
+ ::value>::type>
+ explicit
+ shuffle_order_engine(_Sseq& __q)
+ : _M_b(__q)
+ { _M_initialize(); }
/**
* @brief Reseeds the %shuffle_order_engine object with the default seed
@@ -1182,12 +1209,14 @@ namespace std
* sequence.
* @param __q A seed generator function.
*/
- void
- seed(seed_seq& __q)
- {
- _M_b.seed(__q);
- _M_initialize();
- }
+ template<typename _Sseq, typename
+ = typename std::enable_if<std::is_class<_Sseq>::value>::type>
+ void
+ seed(_Sseq& __q)
+ {
+ _M_b.seed<_Sseq>(__q);
+ _M_initialize();
+ }
/**
* Gets a const reference to the underlying generator engine object.
@@ -1311,8 +1340,8 @@ namespace std
* The classic Mersenne Twister.
*
* Reference:
- * M. Matsumoto and T. Nishimura, "Mersenne Twister: A 623-Dimensionally
- * Equidistributed Uniform Pseudo-Random Number Generator", ACM Transactions
+ * M. Matsumoto and T. Nishimura, Mersenne Twister: A 623-Dimensionally
+ * Equidistributed Uniform Pseudo-Random Number Generator, ACM Transactions
* on Modeling and Computer Simulation, Vol. 8, No. 1, January 1998, pp 3-30.
*/
typedef mersenne_twister_engine<
diff --git a/libstdc++-v3/include/bits/random.tcc b/libstdc++-v3/include/bits/random.tcc
index 712426ec9b6..ee92240365a 100644
--- a/libstdc++-v3/include/bits/random.tcc
+++ b/libstdc++-v3/include/bits/random.tcc
@@ -1,6 +1,6 @@
// random number generation (out of line) -*- C++ -*-
-// Copyright (C) 2009 Free Software Foundation, Inc.
+// Copyright (C) 2009, 2010 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -126,24 +126,25 @@ namespace std
* Seeds the LCR engine with a value generated by @p __q.
*/
template<typename _UIntType, _UIntType __a, _UIntType __c, _UIntType __m>
- void
- linear_congruential_engine<_UIntType, __a, __c, __m>::
- seed(seed_seq& __q)
- {
- const _UIntType __k0 = __m == 0 ? std::numeric_limits<_UIntType>::digits
- : std::__lg(__m);
- const _UIntType __k = (__k0 + 31) / 32;
- uint_least32_t __arr[__k + 3];
- __q.generate(__arr + 0, __arr + __k + 3);
- _UIntType __factor = 1u;
- _UIntType __sum = 0u;
- for (size_t __j = 0; __j < __k; ++__j)
- {
- __sum += __arr[__j + 3] * __factor;
- __factor *= __detail::_Shift<_UIntType, 32>::__value;
- }
- seed(__sum);
- }
+ template<typename _Sseq, typename>
+ void
+ linear_congruential_engine<_UIntType, __a, __c, __m>::
+ seed(_Sseq& __q)
+ {
+ const _UIntType __k0 = __m == 0 ? std::numeric_limits<_UIntType>::digits
+ : std::__lg(__m);
+ const _UIntType __k = (__k0 + 31) / 32;
+ uint_least32_t __arr[__k + 3];
+ __q.generate(__arr + 0, __arr + __k + 3);
+ _UIntType __factor = 1u;
+ _UIntType __sum = 0u;
+ for (size_t __j = 0; __j < __k; ++__j)
+ {
+ __sum += __arr[__j + 3] * __factor;
+ __factor *= __detail::_Shift<_UIntType, 32>::__value;
+ }
+ seed(__sum);
+ }
template<typename _UIntType, _UIntType __a, _UIntType __c, _UIntType __m,
typename _CharT, typename _Traits>
@@ -343,43 +344,44 @@ namespace std
_UIntType __a, size_t __u, _UIntType __d, size_t __s,
_UIntType __b, size_t __t, _UIntType __c, size_t __l,
_UIntType __f>
- void
- mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d,
+ template<typename _Sseq, typename>
+ void
+ mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d,
__s, __b, __t, __c, __l, __f>::
- seed(seed_seq& __q)
- {
- const _UIntType __upper_mask = (~_UIntType()) << __r;
- const size_t __k = (__w + 31) / 32;
- uint_least32_t __arr[__n * __k];
- __q.generate(__arr + 0, __arr + __n * __k);
-
- bool __zero = true;
- for (size_t __i = 0; __i < state_size; ++__i)
- {
- _UIntType __factor = 1u;
- _UIntType __sum = 0u;
- for (size_t __j = 0; __j < __k; ++__j)
- {
- __sum += __arr[__k * __i + __j] * __factor;
- __factor *= __detail::_Shift<_UIntType, 32>::__value;
- }
- _M_x[__i] = __detail::__mod<_UIntType,
- __detail::_Shift<_UIntType, __w>::__value>(__sum);
+ seed(_Sseq& __q)
+ {
+ const _UIntType __upper_mask = (~_UIntType()) << __r;
+ const size_t __k = (__w + 31) / 32;
+ uint_least32_t __arr[__n * __k];
+ __q.generate(__arr + 0, __arr + __n * __k);
+
+ bool __zero = true;
+ for (size_t __i = 0; __i < state_size; ++__i)
+ {
+ _UIntType __factor = 1u;
+ _UIntType __sum = 0u;
+ for (size_t __j = 0; __j < __k; ++__j)
+ {
+ __sum += __arr[__k * __i + __j] * __factor;
+ __factor *= __detail::_Shift<_UIntType, 32>::__value;
+ }
+ _M_x[__i] = __detail::__mod<_UIntType,
+ __detail::_Shift<_UIntType, __w>::__value>(__sum);
- if (__zero)
- {
- if (__i == 0)
- {
- if ((_M_x[0] & __upper_mask) != 0u)
- __zero = false;
- }
- else if (_M_x[__i] != 0u)
- __zero = false;
- }
- }
+ if (__zero)
+ {
+ if (__i == 0)
+ {
+ if ((_M_x[0] & __upper_mask) != 0u)
+ __zero = false;
+ }
+ else if (_M_x[__i] != 0u)
+ __zero = false;
+ }
+ }
if (__zero)
_M_x[0] = __detail::_Shift<_UIntType, __w - 1>::__value;
- }
+ }
template<typename _UIntType, size_t __w,
size_t __n, size_t __m, size_t __r,
@@ -529,29 +531,30 @@ namespace std
}
template<typename _UIntType, size_t __w, size_t __s, size_t __r>
- void
- subtract_with_carry_engine<_UIntType, __w, __s, __r>::
- seed(seed_seq& __q)
- {
- const size_t __k = (__w + 31) / 32;
- uint_least32_t __arr[__r * __k];
- __q.generate(__arr + 0, __arr + __r * __k);
+ template<typename _Sseq, typename>
+ void
+ subtract_with_carry_engine<_UIntType, __w, __s, __r>::
+ seed(_Sseq& __q)
+ {
+ const size_t __k = (__w + 31) / 32;
+ uint_least32_t __arr[__r * __k];
+ __q.generate(__arr + 0, __arr + __r * __k);
- for (size_t __i = 0; __i < long_lag; ++__i)
- {
- _UIntType __sum = 0u;
- _UIntType __factor = 1u;
- for (size_t __j = 0; __j < __k; ++__j)
- {
- __sum += __arr[__k * __i + __j] * __factor;
- __factor *= __detail::_Shift<_UIntType, 32>::__value;
- }
- _M_x[__i] = __detail::__mod<_UIntType,
- __detail::_Shift<_UIntType, __w>::__value>(__sum);
- }
- _M_carry = (_M_x[long_lag - 1] == 0) ? 1 : 0;
- _M_p = 0;
- }
+ for (size_t __i = 0; __i < long_lag; ++__i)
+ {
+ _UIntType __sum = 0u;
+ _UIntType __factor = 1u;
+ for (size_t __j = 0; __j < __k; ++__j)
+ {
+ __sum += __arr[__k * __i + __j] * __factor;
+ __factor *= __detail::_Shift<_UIntType, 32>::__value;
+ }
+ _M_x[__i] = __detail::__mod<_UIntType,
+ __detail::_Shift<_UIntType, __w>::__value>(__sum);
+ }
+ _M_carry = (_M_x[long_lag - 1] == 0) ? 1 : 0;
+ _M_p = 0;
+ }
template<typename _UIntType, size_t __w, size_t __s, size_t __r>
typename subtract_with_carry_engine<_UIntType, __w, __s, __r>::
@@ -1137,7 +1140,7 @@ namespace std
* is defined.
*
* Reference:
- * Devroye, L. "Non-Uniform Random Variates Generation." Springer-Verlag,
+ * Devroye, L. Non-Uniform Random Variates Generation. Springer-Verlag,
* New York, 1986, Ch. X, Sects. 3.3 & 3.4 (+ Errata!).
*/
template<typename _IntType>
@@ -1369,7 +1372,7 @@ namespace std
* is defined.
*
* Reference:
- * Devroye, L. "Non-Uniform Random Variates Generation." Springer-Verlag,
+ * Devroye, L. Non-Uniform Random Variates Generation. Springer-Verlag,
* New York, 1986, Ch. X, Sect. 4 (+ Errata!).
*/
template<typename _IntType>
@@ -1586,7 +1589,7 @@ namespace std
/**
* Polar method due to Marsaglia.
*
- * Devroye, L. "Non-Uniform Random Variates Generation." Springer-Verlag,
+ * Devroye, L. Non-Uniform Random Variates Generation. Springer-Verlag,
* New York, 1986, Ch. V, Sect. 4.4.
*/
template<typename _RealType>
diff --git a/libstdc++-v3/include/bits/stl_algo.h b/libstdc++-v3/include/bits/stl_algo.h
index f6c98f8f59c..ed72656c09b 100644
--- a/libstdc++-v3/include/bits/stl_algo.h
+++ b/libstdc++-v3/include/bits/stl_algo.h
@@ -1,6 +1,6 @@
// Algorithm implementation -*- C++ -*-
-// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -2460,8 +2460,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* @param first An iterator.
* @param last Another iterator.
* @param val The search term.
- * @return An iterator pointing to the first element "not less
- * than" @a val, or end() if every element is less than
+ * @return An iterator pointing to the first element <em>not less
+ * than</em> @a val, or end() if every element is less than
* @a val.
* @ingroup binary_search_algorithms
*/
@@ -2509,8 +2509,9 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* @param last Another iterator.
* @param val The search term.
* @param comp A functor to use for comparisons.
- * @return An iterator pointing to the first element "not less than" @a val,
- * or end() if every element is less than @a val.
+ * @return An iterator pointing to the first element <em>not less
+ * than</em> @a val, or end() if every element is less
+ * than @a val.
* @ingroup binary_search_algorithms
*
* The comparison function should have the same effects on ordering as
@@ -3633,13 +3634,13 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
// max_element
/**
- * @brief Permute range into the next "dictionary" ordering.
+ * @brief Permute range into the next @a dictionary ordering.
* @ingroup sorting_algorithms
* @param first Start of range.
* @param last End of range.
* @return False if wrapped to first permutation, true otherwise.
*
- * Treats all permutations of the range as a set of "dictionary" sorted
+ * Treats all permutations of the range as a set of @a dictionary sorted
* sequences. Permutes the current sequence into the next one of this set.
* Returns true if there are more sequences to generate. If the sequence
* is the largest of the set, the smallest is generated and false returned.
@@ -3687,7 +3688,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
}
/**
- * @brief Permute range into the next "dictionary" ordering using
+ * @brief Permute range into the next @a dictionary ordering using
* comparison functor.
* @ingroup sorting_algorithms
* @param first Start of range.
@@ -3696,7 +3697,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* @return False if wrapped to first permutation, true otherwise.
*
* Treats all permutations of the range [first,last) as a set of
- * "dictionary" sorted sequences ordered by @a comp. Permutes the current
+ * @a dictionary sorted sequences ordered by @a comp. Permutes the current
* sequence into the next one of this set. Returns true if there are more
* sequences to generate. If the sequence is the largest of the set, the
* smallest is generated and false returned.
@@ -3745,13 +3746,13 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
}
/**
- * @brief Permute range into the previous "dictionary" ordering.
+ * @brief Permute range into the previous @a dictionary ordering.
* @ingroup sorting_algorithms
* @param first Start of range.
* @param last End of range.
* @return False if wrapped to last permutation, true otherwise.
*
- * Treats all permutations of the range as a set of "dictionary" sorted
+ * Treats all permutations of the range as a set of @a dictionary sorted
* sequences. Permutes the current sequence into the previous one of this
* set. Returns true if there are more sequences to generate. If the
* sequence is the smallest of the set, the largest is generated and false
@@ -3800,7 +3801,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
}
/**
- * @brief Permute range into the previous "dictionary" ordering using
+ * @brief Permute range into the previous @a dictionary ordering using
* comparison functor.
* @ingroup sorting_algorithms
* @param first Start of range.
@@ -3809,7 +3810,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* @return False if wrapped to last permutation, true otherwise.
*
* Treats all permutations of the range [first,last) as a set of
- * "dictionary" sorted sequences ordered by @a comp. Permutes the current
+ * @a dictionary sorted sequences ordered by @a comp. Permutes the current
* sequence into the previous one of this set. Returns true if there are
* more sequences to generate. If the sequence is the smallest of the set,
* the largest is generated and false returned.
@@ -5347,8 +5348,8 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_P)
* @param last1 Another iterator.
* @param last2 Another iterator.
* @param result An iterator pointing to the end of the merged range.
- * @return An iterator pointing to the first element "not less
- * than" @a val.
+ * @return An iterator pointing to the first element <em>not less
+ * than</em> @a val.
*
* Merges the ranges [first1,last1) and [first2,last2) into the sorted range
* [result, result + (last1-first1) + (last2-first2)). Both input ranges
diff --git a/libstdc++-v3/include/bits/stl_algobase.h b/libstdc++-v3/include/bits/stl_algobase.h
index 5f6c648cc0c..3575279226b 100644
--- a/libstdc++-v3/include/bits/stl_algobase.h
+++ b/libstdc++-v3/include/bits/stl_algobase.h
@@ -262,34 +262,46 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
// If _Iterator has a base returns it otherwise _Iterator is returned
// untouched
template<typename _Iterator, bool _HasBase>
- struct __iter_base
+ struct _Iter_base
{
- static _Iterator
- __b(_Iterator __it)
+ typedef _Iterator iterator_type;
+ static iterator_type
+ _S_base(_Iterator __it)
{ return __it; }
};
template<typename _Iterator>
- struct __iter_base<_Iterator, true>
+ struct _Iter_base<_Iterator, true>
{
- static typename _Iterator::iterator_type
- __b(_Iterator __it)
+ typedef typename _Iterator::iterator_type iterator_type;
+ static iterator_type
+ _S_base(_Iterator __it)
{ return __it.base(); }
};
// If _Iterator is a __normal_iterator return its base (a plain pointer,
// normally) otherwise return it untouched. See copy, fill, ...
template<typename _Iterator>
- struct __niter_base
- : __iter_base<_Iterator, __is_normal_iterator<_Iterator>::__value>
+ struct _Niter_base
+ : _Iter_base<_Iterator, __is_normal_iterator<_Iterator>::__value>
{ };
+ template<typename _Iterator>
+ inline typename _Niter_base<_Iterator>::iterator_type
+ __niter_base(_Iterator __it)
+ { return std::_Niter_base<_Iterator>::_S_base(__it); }
+
// Likewise, for move_iterator.
template<typename _Iterator>
- struct __miter_base
- : __iter_base<_Iterator, __is_move_iterator<_Iterator>::__value>
+ struct _Miter_base
+ : _Iter_base<_Iterator, __is_move_iterator<_Iterator>::__value>
{ };
+ template<typename _Iterator>
+ inline typename _Miter_base<_Iterator>::iterator_type
+ __miter_base(_Iterator __it)
+ { return std::_Miter_base<_Iterator>::_S_base(__it); }
+
// All of these auxiliary structs serve two purposes. (1) Replace
// calls to copy with memmove whenever possible. (Memmove, not memcpy,
// because the input and output ranges are permitted to overlap.)
@@ -425,10 +437,9 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
inline _OI
__copy_move_a2(_II __first, _II __last, _OI __result)
{
- return _OI(std::__copy_move_a<_IsMove>
- (std::__niter_base<_II>::__b(__first),
- std::__niter_base<_II>::__b(__last),
- std::__niter_base<_OI>::__b(__result)));
+ return _OI(std::__copy_move_a<_IsMove>(std::__niter_base(__first),
+ std::__niter_base(__last),
+ std::__niter_base(__result)));
}
/**
@@ -459,8 +470,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
__glibcxx_requires_valid_range(__first, __last);
return (std::__copy_move_a2<__is_move_iterator<_II>::__value>
- (std::__miter_base<_II>::__b(__first),
- std::__miter_base<_II>::__b(__last), __result));
+ (std::__miter_base(__first), std::__miter_base(__last),
+ __result));
}
#ifdef __GXX_EXPERIMENTAL_CXX0X__
@@ -491,9 +502,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
typename iterator_traits<_II>::value_type>)
__glibcxx_requires_valid_range(__first, __last);
- return (std::__copy_move_a2<true>
- (std::__miter_base<_II>::__b(__first),
- std::__miter_base<_II>::__b(__last), __result));
+ return std::__copy_move_a2<true>(std::__miter_base(__first),
+ std::__miter_base(__last), __result);
}
#define _GLIBCXX_MOVE3(_Tp, _Up, _Vp) std::move(_Tp, _Up, _Vp)
@@ -596,9 +606,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
__copy_move_backward_a2(_BI1 __first, _BI1 __last, _BI2 __result)
{
return _BI2(std::__copy_move_backward_a<_IsMove>
- (std::__niter_base<_BI1>::__b(__first),
- std::__niter_base<_BI1>::__b(__last),
- std::__niter_base<_BI2>::__b(__result)));
+ (std::__niter_base(__first), std::__niter_base(__last),
+ std::__niter_base(__result)));
}
/**
@@ -632,8 +641,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
__glibcxx_requires_valid_range(__first, __last);
return (std::__copy_move_backward_a2<__is_move_iterator<_BI1>::__value>
- (std::__miter_base<_BI1>::__b(__first),
- std::__miter_base<_BI1>::__b(__last), __result));
+ (std::__miter_base(__first), std::__miter_base(__last),
+ __result));
}
#ifdef __GXX_EXPERIMENTAL_CXX0X__
@@ -667,9 +676,9 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
typename iterator_traits<_BI2>::value_type>)
__glibcxx_requires_valid_range(__first, __last);
- return (std::__copy_move_backward_a2<true>
- (std::__miter_base<_BI1>::__b(__first),
- std::__miter_base<_BI1>::__b(__last), __result));
+ return std::__copy_move_backward_a2<true>(std::__miter_base(__first),
+ std::__miter_base(__last),
+ __result);
}
#define _GLIBCXX_MOVE_BACKWARD3(_Tp, _Up, _Vp) std::move_backward(_Tp, _Up, _Vp)
@@ -730,8 +739,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
_ForwardIterator>)
__glibcxx_requires_valid_range(__first, __last);
- std::__fill_a(std::__niter_base<_ForwardIterator>::__b(__first),
- std::__niter_base<_ForwardIterator>::__b(__last), __value);
+ std::__fill_a(std::__niter_base(__first), std::__niter_base(__last),
+ __value);
}
template<typename _OutputIterator, typename _Size, typename _Tp>
@@ -786,8 +795,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
// concept requirements
__glibcxx_function_requires(_OutputIteratorConcept<_OI, _Tp>)
- return _OI(std::__fill_n_a(std::__niter_base<_OI>::__b(__first),
- __n, __value));
+ return _OI(std::__fill_n_a(std::__niter_base(__first), __n, __value));
}
template<bool _BoolType>
@@ -958,9 +966,9 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_P)
typename iterator_traits<_II2>::value_type>)
__glibcxx_requires_valid_range(__first1, __last1);
- return std::__equal_aux(std::__niter_base<_II1>::__b(__first1),
- std::__niter_base<_II1>::__b(__last1),
- std::__niter_base<_II2>::__b(__first2));
+ return std::__equal_aux(std::__niter_base(__first1),
+ std::__niter_base(__last1),
+ std::__niter_base(__first2));
}
/**
@@ -995,7 +1003,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_P)
}
/**
- * @brief Performs 'dictionary' comparison on ranges.
+ * @brief Performs @b dictionary comparison on ranges.
* @ingroup sorting_algorithms
* @param first1 An input iterator.
* @param last1 An input iterator.
@@ -1003,9 +1011,9 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_P)
* @param last2 An input iterator.
* @return A boolean true or false.
*
- * 'Returns true if the sequence of elements defined by the range
+ * <em>Returns true if the sequence of elements defined by the range
* [first1,last1) is lexicographically less than the sequence of elements
- * defined by the range [first2,last2). Returns false otherwise.'
+ * defined by the range [first2,last2). Returns false otherwise.</em>
* (Quoted from [25.3.8]/1.) If the iterators are all character pointers,
* then this is an inline call to @c memcmp.
*/
@@ -1024,15 +1032,14 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_P)
__glibcxx_requires_valid_range(__first1, __last1);
__glibcxx_requires_valid_range(__first2, __last2);
- return std::__lexicographical_compare_aux
- (std::__niter_base<_II1>::__b(__first1),
- std::__niter_base<_II1>::__b(__last1),
- std::__niter_base<_II2>::__b(__first2),
- std::__niter_base<_II2>::__b(__last2));
+ return std::__lexicographical_compare_aux(std::__niter_base(__first1),
+ std::__niter_base(__last1),
+ std::__niter_base(__first2),
+ std::__niter_base(__last2));
}
/**
- * @brief Performs "dictionary" comparison on ranges.
+ * @brief Performs @b dictionary comparison on ranges.
* @ingroup sorting_algorithms
* @param first1 An input iterator.
* @param last1 An input iterator.
diff --git a/libstdc++-v3/include/bits/stl_deque.h b/libstdc++-v3/include/bits/stl_deque.h
index 7e60b658b65..19022b0cf34 100644
--- a/libstdc++-v3/include/bits/stl_deque.h
+++ b/libstdc++-v3/include/bits/stl_deque.h
@@ -69,12 +69,13 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
* @param size The size of an element.
* @return The number (not byte size) of elements per node.
*
- * This function started off as a compiler kludge from SGI, but seems to
- * be a useful wrapper around a repeated constant expression. The '512' is
- * tunable (and no other code needs to change), but no investigation has
- * been done since inheriting the SGI code. Touch _GLIBCXX_DEQUE_BUF_SIZE
- * only if you know what you are doing, however: changing it breaks the
- * binary compatibility!!
+ * This function started off as a compiler kludge from SGI, but
+ * seems to be a useful wrapper around a repeated constant
+ * expression. The @b 512 is tunable (and no other code needs to
+ * change), but no investigation has been done since inheriting the
+ * SGI code. Touch _GLIBCXX_DEQUE_BUF_SIZE only if you know what
+ * you are doing, however: changing it breaks the binary
+ * compatibility!!
*/
#ifndef _GLIBCXX_DEQUE_BUF_SIZE
@@ -650,14 +651,14 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
* - iterator _M_start, _M_finish
*
* map_size is at least 8. %map is an array of map_size
- * pointers-to-"nodes". (The name %map has nothing to do with the
- * std::map class, and "nodes" should not be confused with
- * std::list's usage of "node".)
+ * pointers-to-@anodes. (The name %map has nothing to do with the
+ * std::map class, and @b nodes should not be confused with
+ * std::list's usage of @a node.)
*
- * A "node" has no specific type name as such, but it is referred
- * to as "node" in this file. It is a simple array-of-Tp. If Tp
+ * A @a node has no specific type name as such, but it is referred
+ * to as @a node in this file. It is a simple array-of-Tp. If Tp
* is very large, there will be one Tp element per node (i.e., an
- * "array" of one). For non-huge Tp's, node size is inversely
+ * @a array of one). For non-huge Tp's, node size is inversely
* related to Tp size: the larger the Tp, the fewer Tp's will fit
* in a node. The goal here is to keep the total size of a node
* relatively small and constant over different Tp's, to improve
@@ -669,7 +670,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
* will be unused. This same situation will arise as the %map
* grows: available %map pointers, if any, will be on the ends. As
* new nodes are created, only a subset of the %map's pointers need
- * to be copied "outward".
+ * to be copied @a outward.
*
* Class invariants:
* - For any nonsingular iterator i:
@@ -699,11 +700,11 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
* node if and only if the pointer is in the range
* [start.node, finish.node].
*
- * Here's the magic: nothing in deque is "aware" of the discontiguous
+ * Here's the magic: nothing in deque is @b aware of the discontiguous
* storage!
*
* The memory setup and layout occurs in the parent, _Base, and the iterator
- * class is entirely responsible for "leaping" from one node to the next.
+ * class is entirely responsible for @a leaping from one node to the next.
* All the implementation routines for deque itself work only through the
* start and finish iterators. This keeps the routines simple and sane,
* and we can use other standard algorithms as well.
@@ -1392,7 +1393,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
*
* This function will insert copies of the data in the
* initializer_list @a l into the %deque before the location
- * specified by @a p. This is known as "list insert."
+ * specified by @a p. This is known as <em>list insert</em>.
*/
void
insert(iterator __p, initializer_list<value_type> __l)
@@ -1420,7 +1421,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
*
* This function will insert copies of the data in the range
* [first,last) into the %deque before the location specified
- * by @a pos. This is known as "range insert."
+ * by @a pos. This is known as <em>range insert</em>.
*/
template<typename _InputIterator>
void
diff --git a/libstdc++-v3/include/bits/stl_function.h b/libstdc++-v3/include/bits/stl_function.h
index b2569d51780..fd9c3589d69 100644
--- a/libstdc++-v3/include/bits/stl_function.h
+++ b/libstdc++-v3/include/bits/stl_function.h
@@ -1,6 +1,6 @@
// Functor implementations -*- C++ -*-
-// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -68,7 +68,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* templates and used in place of a function pointer. Not only is the
* resulting expressiveness of the library increased, but the generated
* code can be more efficient than what you might write by hand. When we
- * refer to "functors," then, generally we include function pointers in
+ * refer to @a functors, then, generally we include function pointers in
* the description as well.
*
* Often, functors are only created as temporaries passed to algorithm
@@ -333,7 +333,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* std::find_if (v.begin(), v.end(), not1(IntGreaterThanThree()));
* \endcode
* The call to @c find_if will locate the first index (i) of @c v for which
- * "!(v[i] > 3)" is true.
+ * <code>!(v[i] > 3)</code> is true.
*
* The not1/unary_negate combination works on predicates taking a single
* argument. The not2/binary_negate combination works on predicates which
diff --git a/libstdc++-v3/include/bits/stl_iterator.h b/libstdc++-v3/include/bits/stl_iterator.h
index d6c4b517843..105469acb4e 100644
--- a/libstdc++-v3/include/bits/stl_iterator.h
+++ b/libstdc++-v3/include/bits/stl_iterator.h
@@ -1,6 +1,6 @@
// Iterators -*- C++ -*-
-// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -83,9 +83,9 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* &*(reverse_iterator(i)) == &*(i - 1)
* @endcode
*
- * This mapping is dictated by the fact that while there is always a
+ * <em>This mapping is dictated by the fact that while there is always a
* pointer past the end of an array, there might not be a valid pointer
- * before the beginning of an array.' [24.4.1]/1,2
+ * before the beginning of an array.</em> [24.4.1]/1,2
*
* Reverse iterators can be tricky and surprising at first. Their
* semantics make sense, however, and the trickiness is a side effect of
@@ -411,7 +411,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* reference-to-const T for container<T>.
* @return This %iterator, for chained operations.
*
- * This kind of %iterator doesn't really have a "position" in the
+ * This kind of %iterator doesn't really have a @a position in the
* container (you can think of the position as being permanently at
* the end, if you like). Assigning a value to the %iterator will
* always append the value to the end of the container.
@@ -437,12 +437,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
operator*()
{ return *this; }
- /// Simply returns *this. (This %iterator does not "move".)
+ /// Simply returns *this. (This %iterator does not @a move.)
back_insert_iterator&
operator++()
{ return *this; }
- /// Simply returns *this. (This %iterator does not "move".)
+ /// Simply returns *this. (This %iterator does not @a move.)
back_insert_iterator
operator++(int)
{ return *this; }
@@ -494,7 +494,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* reference-to-const T for container<T>.
* @return This %iterator, for chained operations.
*
- * This kind of %iterator doesn't really have a "position" in the
+ * This kind of %iterator doesn't really have a @a position in the
* container (you can think of the position as being permanently at
* the front, if you like). Assigning a value to the %iterator will
* always prepend the value to the front of the container.
@@ -520,12 +520,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
operator*()
{ return *this; }
- /// Simply returns *this. (This %iterator does not "move".)
+ /// Simply returns *this. (This %iterator does not @a move.)
front_insert_iterator&
operator++()
{ return *this; }
- /// Simply returns *this. (This %iterator does not "move".)
+ /// Simply returns *this. (This %iterator does not @a move.)
front_insert_iterator
operator++(int)
{ return *this; }
@@ -626,12 +626,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
operator*()
{ return *this; }
- /// Simply returns *this. (This %iterator does not "move".)
+ /// Simply returns *this. (This %iterator does not @a move.)
insert_iterator&
operator++()
{ return *this; }
- /// Simply returns *this. (This %iterator does not "move".)
+ /// Simply returns *this. (This %iterator does not @a move.)
insert_iterator&
operator++(int)
{ return *this; }
@@ -662,7 +662,7 @@ _GLIBCXX_END_NAMESPACE
_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
- // This iterator adapter is 'normal' in the sense that it does not
+ // This iterator adapter is @a normal in the sense that it does not
// change the semantics of any of the operators of its iterator
// parameter. Its primary purpose is to convert an iterator that is
// not a class, e.g. a pointer, into an iterator that is a class.
diff --git a/libstdc++-v3/include/bits/stl_iterator_base_funcs.h b/libstdc++-v3/include/bits/stl_iterator_base_funcs.h
index b629ca20231..627fbe917ee 100644
--- a/libstdc++-v3/include/bits/stl_iterator_base_funcs.h
+++ b/libstdc++-v3/include/bits/stl_iterator_base_funcs.h
@@ -1,6 +1,6 @@
// Functions used by iterators -*- C++ -*-
-// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -154,7 +154,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
/**
* @brief A generalization of pointer arithmetic.
* @param i An input iterator.
- * @param n The "delta" by which to change @p i.
+ * @param n The @a delta by which to change @p i.
* @return Nothing.
*
* This increments @p i by @p n. For bidirectional and random access
diff --git a/libstdc++-v3/include/bits/stl_iterator_base_types.h b/libstdc++-v3/include/bits/stl_iterator_base_types.h
index d2bf647f058..07687bd2cd3 100644
--- a/libstdc++-v3/include/bits/stl_iterator_base_types.h
+++ b/libstdc++-v3/include/bits/stl_iterator_base_types.h
@@ -1,6 +1,6 @@
// Types used in iterator implementation -*- C++ -*-
-// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -123,7 +123,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* @brief Traits class for iterators.
*
* This class does nothing but define nested typedefs. The general
- * version simply "forwards" the nested typedefs from the Iterator
+ * version simply @a forwards the nested typedefs from the Iterator
* argument. Specialized versions for pointers and pointers-to-const
* provide tighter, more correct semantics.
*/
diff --git a/libstdc++-v3/include/bits/stl_map.h b/libstdc++-v3/include/bits/stl_map.h
index a13eeb56fbb..7f81fab1c64 100644
--- a/libstdc++-v3/include/bits/stl_map.h
+++ b/libstdc++-v3/include/bits/stl_map.h
@@ -532,7 +532,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
*
* See
* http://gcc.gnu.org/onlinedocs/libstdc++/manual/bk01pt07ch17.html
- * for more on "hinting".
+ * for more on @a hinting.
*
* Insertion requires logarithmic time (if the hint is not taken).
*/
diff --git a/libstdc++-v3/include/bits/stl_multimap.h b/libstdc++-v3/include/bits/stl_multimap.h
index b582e38729a..e5575bc9f72 100644
--- a/libstdc++-v3/include/bits/stl_multimap.h
+++ b/libstdc++-v3/include/bits/stl_multimap.h
@@ -453,7 +453,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
* improve the performance of the insertion process. A bad hint would
* cause no gains in efficiency.
*
- * For more on "hinting," see:
+ * For more on @a hinting, see:
* http://gcc.gnu.org/onlinedocs/libstdc++/manual/bk01pt07ch17.html
*
* Insertion requires logarithmic time (if the hint is not taken).
diff --git a/libstdc++-v3/include/bits/stl_multiset.h b/libstdc++-v3/include/bits/stl_multiset.h
index dfbef1bb823..209e58eb9e8 100644
--- a/libstdc++-v3/include/bits/stl_multiset.h
+++ b/libstdc++-v3/include/bits/stl_multiset.h
@@ -412,7 +412,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
* cause no gains in efficiency.
*
* See http://gcc.gnu.org/onlinedocs/libstdc++/manual/bk01pt07ch17.html
- * for more on "hinting".
+ * for more on @a hinting.
*
* Insertion requires logarithmic time (if the hint is not taken).
*/
@@ -421,7 +421,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
{ return _M_t._M_insert_equal_(__position, __x); }
/**
- * @brief A template function that attempts to insert a range of elements.
+ * @brief A template function that tries to insert a range of elements.
* @param first Iterator pointing to the start of the range to be
* inserted.
* @param last Iterator pointing to the end of the range.
diff --git a/libstdc++-v3/include/bits/stl_queue.h b/libstdc++-v3/include/bits/stl_queue.h
index 61149c45708..058f1b65d27 100644
--- a/libstdc++-v3/include/bits/stl_queue.h
+++ b/libstdc++-v3/include/bits/stl_queue.h
@@ -81,7 +81,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* that supports @c front, @c back, @c push_back, and @c pop_front,
* such as std::list or an appropriate user-defined type.
*
- * Members not found in "normal" containers are @c container_type,
+ * Members not found in @a normal containers are @c container_type,
* which is a typedef for the second Sequence parameter, and @c push and
* @c pop, which are standard %queue/FIFO operations.
*/
@@ -340,7 +340,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* priority comparisons. It defaults to @c less<value_type> but
* can be anything defining a strict weak ordering.
*
- * Members not found in "normal" containers are @c container_type,
+ * Members not found in @a normal containers are @c container_type,
* which is a typedef for the second Sequence parameter, and @c
* push, @c pop, and @c top, which are standard %queue operations.
*
diff --git a/libstdc++-v3/include/bits/stl_set.h b/libstdc++-v3/include/bits/stl_set.h
index 3b0d86f9367..54321e278ac 100644
--- a/libstdc++-v3/include/bits/stl_set.h
+++ b/libstdc++-v3/include/bits/stl_set.h
@@ -423,7 +423,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
* potentially improve the performance of the insertion process. A bad
* hint would cause no gains in efficiency.
*
- * For more on "hinting", see:
+ * For more on @a hinting, see:
* http://gcc.gnu.org/onlinedocs/libstdc++/manual/bk01pt07ch17.html
*
* Insertion requires logarithmic time (if the hint is not taken).
diff --git a/libstdc++-v3/include/bits/stl_stack.h b/libstdc++-v3/include/bits/stl_stack.h
index 41784087210..26f50ad66f8 100644
--- a/libstdc++-v3/include/bits/stl_stack.h
+++ b/libstdc++-v3/include/bits/stl_stack.h
@@ -1,6 +1,6 @@
// Stack implementation -*- C++ -*-
-// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -83,7 +83,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* such as std::list, std::vector, or an appropriate user-defined
* type.
*
- * Members not found in "normal" containers are @c container_type,
+ * Members not found in @a normal containers are @c container_type,
* which is a typedef for the second Sequence parameter, and @c
* push, @c pop, and @c top, which are standard %stack/FILO
* operations.
diff --git a/libstdc++-v3/include/bits/stl_tempbuf.h b/libstdc++-v3/include/bits/stl_tempbuf.h
index 27b58bf5f81..a08b1ee1324 100644
--- a/libstdc++-v3/include/bits/stl_tempbuf.h
+++ b/libstdc++-v3/include/bits/stl_tempbuf.h
@@ -1,6 +1,6 @@
// Temporary buffer implementation -*- C++ -*-
-// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -72,9 +72,9 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
*
* This function tries to obtain storage for @c len adjacent Tp
* objects. The objects themselves are not constructed, of course.
- * A pair<> is returned containing 'the buffer s address and
+ * A pair<> is returned containing <em>the buffer s address and
* capacity (in the units of sizeof(Tp)), or a pair of 0 values if
- * no storage can be obtained.' Note that the capacity obtained
+ * no storage can be obtained.</em> Note that the capacity obtained
* may be less than that requested if the memory is unavailable;
* you should compare len with the .second return value.
*