]> git.ipfire.org Git - thirdparty/gcc.git/commit
libstdc++: Move std::__niter_base and std::__niter_wrap to stl_iterator.h
authorJonathan Wakely <jwakely@redhat.com>
Wed, 9 Oct 2024 11:55:54 +0000 (12:55 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Fri, 18 Oct 2024 13:49:34 +0000 (14:49 +0100)
commit2608fcfe5fcff260d62379d8f74efb9be8df70f4
treeebc4c0ff601652296baede4a57e9bdcdeb9fec95
parente69c2e212011f2bfa6f8c3748d902690b7a3639a
libstdc++: Move std::__niter_base and std::__niter_wrap to stl_iterator.h

Move the functions for unwrapping and rewrapping __normal_iterator
objects to the same file as the definition of __normal_iterator itself.

This will allow a later commit to make use of std::__niter_base in other
headers without having to include all of <bits/stl_algobase.h>.

libstdc++-v3/ChangeLog:

* include/bits/stl_algobase.h (__niter_base, __niter_wrap): Move
to ...
* include/bits/stl_iterator.h: ... here.
(__niter_base, __miter_base): Move all overloads to the end of
the header.
* testsuite/24_iterators/normal_iterator/wrapping.cc: New test.

Reviewed-by: Patrick Palka <ppalka@redhat.com>
libstdc++-v3/include/bits/stl_algobase.h
libstdc++-v3/include/bits/stl_iterator.h
libstdc++-v3/testsuite/24_iterators/normal_iterator/wrapping.cc [new file with mode: 0644]