[PATCH] Move std::search into algobase.h

François Dumont frs.dumont@gmail.com
Wed May 31 17:39:28 GMT 2023


libstdc++: Reduce <functional> inclusion to <stl_algobase.h>


Move the std::search definition from stl_algo.h to stl_algobase.h and use
the later in <functional>.

For consistency also move std::__parallel::search and associated helpers 
from
<parallel/stl_algo.h> to <parallel/stl_algobase.h> so that 
std::__parallel::search
is accessible along with std::search.

libstdc++-v3/ChangeLog:

             * include/bits/stl_algo.h
             (std::__search, std::search(_FwdIt1, _FwdIt1, _FwdIt2, 
_FwdIt2, _BinPred)): Move...
             * include/bits/stl_algobase.h: ...here.
             * include/std/functional: Replace <stl_algo.h> include by 
<stl_algobase.h>.
             * include/parallel/algo.h (std::__parallel::search<_FIt1, 
_FIt2, _BinaryPred>)
             (std::__parallel::__search_switch<_FIt1, _FIt2, 
_BinaryPred, _ItTag1, _ItTag2>):
             Move...
             * include/parallel/algobase.h: ...here.
             * include/std/functional: Remove <bits/stl_algo.h> and 
<parallel/algorithm>
             includes. Include <bits/stl_algobase.h>.

Tested under Linux x86_64.

Ok to commit ?

François
-------------- next part --------------
A non-text attachment was scrubbed...
Name: search_algo.patch
Type: text/x-patch
Size: 13921 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/libstdc++/attachments/20230531/67c13732/attachment-0001.bin>


More information about the Libstdc++ mailing list