re PR libstdc++/61347 (std::distance(list.first(),list.end()) in O(1))
authorMarc Glisse <marc.glisse@inria.fr>
Mon, 13 Oct 2014 10:00:27 +0000 (12:00 +0200)
committerMarc Glisse <glisse@gcc.gnu.org>
Mon, 13 Oct 2014 10:00:27 +0000 (10:00 +0000)
commit2a5273835024d375fecd273fd066becab39d82af
tree7835b14f444c6776aea7418679db5b551a0f7fb5
parente7da0c235ed855f5449e033b2deed29b77077363
re PR libstdc++/61347 (std::distance(list.first(),list.end()) in O(1))

2014-10-13  Marc Glisse  <marc.glisse@inria.fr>

PR libstdc++/61347
PR libstdc++/63345
* include/bits/list.tcc (_List_base::_M_clear()): Delay cast so it
isn't done for the sentinel.
* include/bits/stl_list.h (_List_base::_M_size): Move...
(_List_base::_List_impl::_M_node): ... here.
(_List_base::_M_get_size(), _List_base::_M_set_size(size_t),
_List_base::_M_inc_size(size_t), _List_base::_M_dec_size(size_t),
_List_base::_M_node_count): Adapt to the move.
* 23_containers/list/requirements/dr438/assign_neg.cc: Update
line number.
* 23_containers/list/requirements/dr438/constructor_1_neg.cc: Likewise.
* 23_containers/list/requirements/dr438/constructor_2_neg.cc: Likewise.
* 23_containers/list/requirements/dr438/insert_neg.cc: Likewise.

From-SVN: r216142
libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/list.tcc
libstdc++-v3/include/bits/stl_list.h
libstdc++-v3/testsuite/23_containers/list/requirements/dr438/assign_neg.cc
libstdc++-v3/testsuite/23_containers/list/requirements/dr438/constructor_1_neg.cc
libstdc++-v3/testsuite/23_containers/list/requirements/dr438/constructor_2_neg.cc
libstdc++-v3/testsuite/23_containers/list/requirements/dr438/insert_neg.cc