summaryrefslogtreecommitdiffstats
path: root/libstdc++-v3/include/bits
diff options
context:
space:
mode:
authorpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>2008-10-15 22:08:09 +0000
committerpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>2008-10-15 22:08:09 +0000
commit2187027e82eed59b19ec922196ace909189d1900 (patch)
tree77d2e1c0e6a9ffe07ffe72266867e943abf9f43e /libstdc++-v3/include/bits
parent8990536adf36862470e5c78507e8017e290f684c (diff)
downloadppe42-gcc-2187027e82eed59b19ec922196ace909189d1900.tar.gz
ppe42-gcc-2187027e82eed59b19ec922196ace909189d1900.zip
2008-10-15 Paolo Carlini <paolo.carlini@oracle.com>
* include/bits/forward_list.h (forward_list<>::max_size): Use Node_allocator; minor cosmetic changes. * testsuite/23_containers/forward_list/capacity/1.cc: Adjust. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@141151 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/include/bits')
-rw-r--r--libstdc++-v3/include/bits/forward_list.h34
1 files changed, 15 insertions, 19 deletions
diff --git a/libstdc++-v3/include/bits/forward_list.h b/libstdc++-v3/include/bits/forward_list.h
index 8e5a6b0a72c..4e16b9c8c55 100644
--- a/libstdc++-v3/include/bits/forward_list.h
+++ b/libstdc++-v3/include/bits/forward_list.h
@@ -604,9 +604,9 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* that the resulting %forward_list's size is the same as the number
* of elements assigned. Old data may be lost.
*/
- template<typename InputIterator>
+ template<typename _InputIterator>
void
- assign(InputIterator __first, InputIterator __last)
+ assign(_InputIterator __first, _InputIterator __last)
{
clear();
insert_after(cbefore_begin(), __first, __last);
@@ -743,7 +743,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
*/
size_type
max_size() const
- { return _Alloc().max_size(); }
+ { return this->_M_get_Node_allocator().max_size(); }
// 23.2.3.3 element access:
@@ -783,9 +783,9 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* and references.
*/
template<typename... _Args>
- void
- emplace_front(_Args&&... __args)
- { _M_insert_after(cbefore_begin(), std::forward<_Args>(__args)...); }
+ void
+ emplace_front(_Args&&... __args)
+ { _M_insert_after(cbefore_begin(), std::forward<_Args>(__args)...); }
/**
* @brief Add data to the front of the %forward_list.
@@ -838,9 +838,9 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* and references.
*/
template<typename... _Args>
- iterator
- emplace_after(const_iterator __pos, _Args&&... __args)
- { _M_insert_after(__pos, std::forward<_Args>(__args)...); }
+ iterator
+ emplace_after(const_iterator __pos, _Args&&... __args)
+ { _M_insert_after(__pos, std::forward<_Args>(__args)...); }
/**
* @brief Inserts given value into %forward_list after specified
@@ -893,8 +893,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* does not invalidate iterators and references.
*/
void
- insert_after(const_iterator __pos,
- size_type __n, const _Tp& __val);
+ insert_after(const_iterator __pos, size_type __n,
+ const _Tp& __val);
/**
* @brief Inserts a range into the %forward_list.
@@ -1055,8 +1055,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* Requires this != @a x.
*/
void
- splice_after(const_iterator __pos,
- forward_list&& __list)
+ splice_after(const_iterator __pos, forward_list&& __list)
{
if (!__list.empty() && &__list != this)
{
@@ -1079,8 +1078,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* inserts it into the current list after @a pos.
*/
void
- splice_after(const_iterator __pos,
- forward_list&& __list,
+ splice_after(const_iterator __pos, forward_list&& __list,
const_iterator __it)
{ this->splice_after(__pos, __list, __it, __it._M_next()); }
@@ -1098,10 +1096,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* Undefined if @a pos is in (before,last).
*/
void
- splice_after(const_iterator __pos,
- forward_list&& __list,
- const_iterator __before,
- const_iterator __last)
+ splice_after(const_iterator __pos, forward_list&& __list,
+ const_iterator __before, const_iterator __last)
{
_Fwd_list_node_base* __tmp
= const_cast<_Fwd_list_node_base* const>(__pos._M_node);
OpenPOWER on IntegriCloud