re PR libstdc++/61347 (std::distance(list.first(),list.end()) in O(1))
authorMarc Glisse <marc.glisse@inria.fr>
Tue, 14 Apr 2015 11:02:48 +0000 (13:02 +0200)
committerMarc Glisse <glisse@gcc.gnu.org>
Tue, 14 Apr 2015 11:02:48 +0000 (11:02 +0000)
commit194571f10e354ff084afd84518f85d3326d118e9
treeb0ae9d80156cd68e14a97919270f242055f36e43
parent453e2916ce448096efd6acc830e2dee35ae8b215
re PR libstdc++/61347 (std::distance(list.first(),list.end()) in O(1))

2015-04-14  Marc Glisse  <marc.glisse@inria.fr>

PR libstdc++/61347
* include/bits/stl_iterator_base_funcs.h (_List_iterator,
_List_const_iterator): Declare.
(__distance): Declare new overloads for _List_iterator and
_List_const_iterator.
* include/bits/stl_list.h (__distance): New overloads for
_List_iterator and _List_const_iterator.
* testsuite/23_containers/list/61347.cc: New testcase.

From-SVN: r222082
libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/stl_iterator_base_funcs.h
libstdc++-v3/include/bits/stl_list.h
libstdc++-v3/testsuite/23_containers/list/61347.cc [new file with mode: 0644]