This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: Refactor forward_list
- From: Paolo Carlini <paolo dot carlini at oracle dot com>
- To: Ed Smith-Rowland <3dw4rd at verizon dot net>
- Cc: libstdc++ <libstdc++ at gcc dot gnu dot org>
- Date: Fri, 17 Oct 2008 10:37:52 +0200
- Subject: Re: Refactor forward_list
- References: <48F7ED05.8010403@verizon.net>
... I applied on top the below tweak, to keep things within 80 columns.
Paolo.
//////////////
2008-10-17 Paolo Carlini <paolo.carlini@oracle.com>
* include/bits/forward_list.h (forward_list<>::insert_after): Minor
cosmetic changes.
Index: include/bits/forward_list.h
===================================================================
*** include/bits/forward_list.h (revision 141189)
--- include/bits/forward_list.h (working copy)
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 888,894 ****
void
insert_after(const_iterator __pos, size_type __n, const _Tp& __val)
{
! forward_list<_Tp, _Alloc> __tmp(__n, __val, this->get_allocator());
this->splice_after(__pos, std::move(__tmp));
}
--- 888,894 ----
void
insert_after(const_iterator __pos, size_type __n, const _Tp& __val)
{
! forward_list __tmp(__n, __val, this->get_allocator());
this->splice_after(__pos, std::move(__tmp));
}
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 910,916 ****
insert_after(const_iterator __pos,
_InputIterator __first, _InputIterator __last)
{
! forward_list<_Tp, _Alloc> __tmp(__first, __last, this->get_allocator());
this->splice_after(__pos, std::move(__tmp));
}
--- 910,916 ----
insert_after(const_iterator __pos,
_InputIterator __first, _InputIterator __last)
{
! forward_list __tmp(__first, __last, this->get_allocator());
this->splice_after(__pos, std::move(__tmp));
}
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 930,936 ****
void
insert_after(const_iterator __pos, std::initializer_list<_Tp> __il)
{
! forward_list<_Tp, _Alloc> __tmp(__il, this->get_allocator());
this->splice_after(__pos, std::move(__tmp));
}
--- 930,936 ----
void
insert_after(const_iterator __pos, std::initializer_list<_Tp> __il)
{
! forward_list __tmp(__il, this->get_allocator());
this->splice_after(__pos, std::move(__tmp));
}
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 1227,1234 ****
_M_initialize_dispatch(_InputIterator __first, _InputIterator __last,
__false_type);
! // Called by forward_list(n,v,a), and the range constructor when it turns out
! // to be the same thing.
void
_M_fill_initialize(size_type __n, const value_type& __value);
};
--- 1227,1234 ----
_M_initialize_dispatch(_InputIterator __first, _InputIterator __last,
__false_type);
! // Called by forward_list(n,v,a), and the range constructor when it
! // turns out to be the same thing.
void
_M_fill_initialize(size_type __n, const value_type& __value);
};