Commit 43094d44 by Paolo Carlini Committed by Paolo Carlini

forward_list.h: Fix comments.

2012-03-14  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/bits/forward_list.h: Fix comments.

From-SVN: r185382
parent 7501ca28
2012-03-14 Paolo Carlini <paolo.carlini@oracle.com>
* include/bits/forward_list.h: Fix comments.
2012-03-13 Terry Guo <terry.guo@arm.com> 2012-03-13 Terry Guo <terry.guo@arm.com>
* testsuite/Makefile.in (TEST_GCC_EXEC_PREFIX): New. * testsuite/Makefile.in (TEST_GCC_EXEC_PREFIX): New.
......
...@@ -536,7 +536,8 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER ...@@ -536,7 +536,8 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* @param __al An allocator object. * @param __al An allocator object.
* *
* Create a %forward_list consisting of copies of the elements * Create a %forward_list consisting of copies of the elements
* in the initializer_list @a __il. This is linear in __il.size(). * in the initializer_list @a __il. This is linear in the number
* of elements of __il.
*/ */
forward_list(std::initializer_list<_Tp> __il, forward_list(std::initializer_list<_Tp> __il,
const _Alloc& __al = _Alloc()) const _Alloc& __al = _Alloc())
...@@ -585,7 +586,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER ...@@ -585,7 +586,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* *
* Replace the contents of the %forward_list with copies of the * Replace the contents of the %forward_list with copies of the
* elements in the initializer_list @a __il. This is linear in * elements in the initializer_list @a __il. This is linear in
* __il.size(). * the number of elements of __il.
*/ */
forward_list& forward_list&
operator=(std::initializer_list<_Tp> __il) operator=(std::initializer_list<_Tp> __il)
...@@ -603,8 +604,8 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER ...@@ -603,8 +604,8 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* in the range [@a __first,@a __last). * in the range [@a __first,@a __last).
* *
* Note that the assignment completely changes the %forward_list and * Note that the assignment completely changes the %forward_list and
* that the resulting %forward_list's size is the same as the number * that the number of elements of the resulting %forward_list's is the
* of elements assigned. Old data may be lost. * same as the number of elements assigned. Old data is lost.
*/ */
template<typename _InputIterator, template<typename _InputIterator,
typename = std::_RequireInputIter<_InputIterator>> typename = std::_RequireInputIter<_InputIterator>>
...@@ -620,10 +621,10 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER ...@@ -620,10 +621,10 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* @param __n Number of elements to be assigned. * @param __n Number of elements to be assigned.
* @param __val Value to be assigned. * @param __val Value to be assigned.
* *
* This function fills a %forward_list with @a __n copies of the given * This function fills a %forward_list with @a __n copies of the
* value. Note that the assignment completely changes the * given value. Note that the assignment completely changes the
* %forward_list and that the resulting %forward_list's size is the * %forward_list, and that the resulting %forward_list has __n
* same as the number of elements assigned. Old data may be lost. * elements. Old data is lost.
*/ */
void void
assign(size_type __n, const _Tp& __val) assign(size_type __n, const _Tp& __val)
...@@ -742,7 +743,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER ...@@ -742,7 +743,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
{ return this->_M_impl._M_head._M_next == 0; } { return this->_M_impl._M_head._M_next == 0; }
/** /**
* Returns the largest possible size of %forward_list. * Returns the largest possible number of elements of %forward_list.
*/ */
size_type size_type
max_size() const noexcept max_size() const noexcept
...@@ -996,9 +997,9 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER ...@@ -996,9 +997,9 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* *
* This function will %resize the %forward_list to the specified * This function will %resize the %forward_list to the specified
* number of elements. If the number is smaller than the * number of elements. If the number is smaller than the
* %forward_list's current size the %forward_list is truncated, * %forward_list's current number of elements the %forward_list
* otherwise the %forward_list is extended and the new elements * is truncated, otherwise the %forward_list is extended and the
* are default constructed. * new elements are default constructed.
*/ */
void void
resize(size_type __sz); resize(size_type __sz);
...@@ -1011,9 +1012,9 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER ...@@ -1011,9 +1012,9 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* *
* This function will %resize the %forward_list to the specified * This function will %resize the %forward_list to the specified
* number of elements. If the number is smaller than the * number of elements. If the number is smaller than the
* %forward_list's current size the %forward_list is truncated, * %forward_list's current number of elements the %forward_list
* otherwise the %forward_list is extended and new elements are * is truncated, otherwise the %forward_list is extended and new
* populated with given data. * elements are populated with given data.
*/ */
void void
resize(size_type __sz, const value_type& __val); resize(size_type __sz, const value_type& __val);
...@@ -1233,11 +1234,11 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER ...@@ -1233,11 +1234,11 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* @brief Forward list equality comparison. * @brief Forward list equality comparison.
* @param __lx A %forward_list * @param __lx A %forward_list
* @param __ly A %forward_list of the same type as @a __lx. * @param __ly A %forward_list of the same type as @a __lx.
* @return True iff the size and elements of the forward lists are equal. * @return True iff the elements of the forward lists are equal.
* *
* This is an equivalence relation. It is linear in the size of the * This is an equivalence relation. It is linear in the number of
* forward lists. Deques are considered equivalent if corresponding * elements of the forward lists. Deques are considered equivalent
* elements compare equal. * if corresponding elements compare equal.
*/ */
template<typename _Tp, typename _Alloc> template<typename _Tp, typename _Alloc>
bool bool
...@@ -1250,8 +1251,9 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER ...@@ -1250,8 +1251,9 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* @param __ly A %forward_list of the same type as @a __lx. * @param __ly A %forward_list of the same type as @a __lx.
* @return True iff @a __lx is lexicographically less than @a __ly. * @return True iff @a __lx is lexicographically less than @a __ly.
* *
* This is a total ordering relation. It is linear in the size of the * This is a total ordering relation. It is linear in the number of
* forward lists. The elements must be comparable with @c <. * elements of the forward lists. The elements must be comparable
* with @c <.
* *
* See std::lexicographical_compare() for how the determination is made. * See std::lexicographical_compare() for how the determination is made.
*/ */
......
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