2010-10-25 Paolo Carlini <paolo.carlini@oracle.com>
+ * include/bits/forward_list.h (_Fwd_list_node_base::swap): Remove.
+ (_Fwd_list_base<>::_Fwd_list_base(_Fwd_list_base&&),
+ _Fwd_list_base<>::_Fwd_list_base(_Fwd_list_base&&, const _Alloc&)):
+ Don't use swap.
+ (forward_list<>::swap): Just use std::swap.
+
+ * include/bits/forward_list.h (_Fwd_list_base<>::_Fwd_list_base(),
+ _Fwd_list_base(const _Alloc&)): Don't zero again _M_next.
+
+ * testsuite/23_containers/forward_list/requirements/dr438/
+ assign_neg.cc: Adjust dg-error line number.
+ * testsuite/23_containers/forward_list/requirements/dr438/
+ insert_neg.cc: Likewise.
+ * testsuite/23_containers/forward_list/requirements/dr438/
+ constructor_1_neg.cc: Likewise.
+ * testsuite/23_containers/forward_list/requirements/dr438/
+ constructor_2_neg.cc: Likewise.
+
+2010-10-25 Paolo Carlini <paolo.carlini@oracle.com>
+
* include/bits/hashtable.h (_Hashtable<>:_M_get_Value_allocator):
Remove, unused.
_Fwd_list_node_base* _M_next;
- static void
- swap(_Fwd_list_node_base& __x, _Fwd_list_node_base& __y)
- { std::swap(__x._M_next, __y._M_next); }
-
_Fwd_list_node_base*
_M_transfer_after(_Fwd_list_node_base* __begin)
{
{ return *static_cast<const _Node_alloc_type*>(&this->_M_impl); }
_Fwd_list_base()
- : _M_impl()
- { this->_M_impl._M_head._M_next = 0; }
+ : _M_impl() { }
_Fwd_list_base(const _Alloc& __a)
- : _M_impl(__a)
- { this->_M_impl._M_head._M_next = 0; }
+ : _M_impl(__a) { }
_Fwd_list_base(const _Fwd_list_base& __lst, const _Alloc& __a);
_Fwd_list_base(_Fwd_list_base&& __lst, const _Alloc& __a)
: _M_impl(__a)
- { _Fwd_list_node_base::swap(this->_M_impl._M_head,
- __lst._M_impl._M_head); }
+ {
+ this->_M_impl._M_head._M_next = __lst._M_impl._M_head._M_next;
+ __lst._M_impl._M_head._M_next = 0;
+ }
_Fwd_list_base(_Fwd_list_base&& __lst)
: _M_impl(__lst._M_get_Node_allocator())
- { _Fwd_list_node_base::swap(this->_M_impl._M_head,
- __lst._M_impl._M_head); }
+ {
+ this->_M_impl._M_head._M_next = __lst._M_impl._M_head._M_next;
+ __lst._M_impl._M_head._M_next = 0;
+ }
~_Fwd_list_base()
{ _M_erase_after(&_M_impl._M_head, 0); }
*/
void
swap(forward_list& __list)
- { _Node_base::swap(this->_M_impl._M_head, __list._M_impl._M_head); }
+ { std::swap(this->_M_impl._M_head._M_next,
+ __list._M_impl._M_head._M_next); }
/**
* @brief Resizes the %forward_list to the specified number of