__GNU_PARALLEL::__REPLACE_IF_SELECTOR(3)
π __gnu_parallel::__replace_if_selector< _It, _Op, _Tp > π
okay bestie, so this is a page from the Library Functions Manual, and it's all about one lil struct in libstdc++ that does the std::replace() thing but in parallel. it's a selector, which is basically the little helper that goes "you take this chunk, I'll take that chunk" when the parallel algorithms are dividing up work. it's giving backstage crew energy, honestly. π
β¨ NAME β¨
__gnu_parallel::__replace_if_selector< _It, _Op, _Tp > β the std::replace() selector. no cap, that's the whole job description.
β¨ SYNOPSIS β¨
#include <for_each_selectors.h>
it Inherits from __gnu_parallel::__generic_for_each_selector< _It >, so it's lowkey part of the for-each-selector family tree. π¦
πΈ Public Member Functions πΈ
__replace_if_selector (const _Tp &__new_val)β the Constructor, babes.bool operator() (_Op &__o, _It __i)β the Functor execution. this is where the magic actually happens.
πΈ Public Attributes πΈ
const _Tp & __new_valβ the Value to replace with. iconic._It _M_finish_iteratorβ_Iterator on last element processed; needed for some algorithms (e. g. std::transform()).she's the bookmark, periodt.
β¨ Detailed Description β¨
template<typename _It, typename _Op, typename _Tp>
struct __gnu_parallel::__replace_if_selector< _It, _Op, _Tp >
that's it. that's the struct. it's the "std::replace() selector." fr fr, it says so right there.
β¨ Constructor & Destructor Documentation β¨
template<typename _It, typename _Op, typename _Tp>
__gnu_parallel::__replace_if_selector< _It, _Op, _Tp >::__replace_if_selector (const _Tp & __new_val) [inline], [explicit]
it's the Constructor. nothing mysterious, she just shows up and gets built. also note the [inline] and [explicit] β yes bestie, she is explicit, no accidental conversions around here π
Parameters
__new_valβ Value to replace with.
References __new_val.
β¨ Member Function Documentation β¨
template<typename _It, typename _Op, typename _Tp> bool
__gnu_parallel::__replace_if_selector< _It, _Op, _Tp >::operator() (_Op & __o, _It __i) [inline]
this is the Functor execution. the actual moment where she does the thing. also [inline], obviously, she's efficient like that. β¨
Parameters
__oβ Operator.__iβ iterator referencing object.
References __new_val.
β¨ Member Data Documentation β¨
template<typename _It, typename _Op, typename _Tp> const _Tp&
__gnu_parallel::__replace_if_selector< _It, _Op, _Tp >::__new_val
Value to replace with. short and sweet, that's her whole personality.
Referenced by __replace_if_selector(), and operator()().
template<typename _It> _It __gnu_parallel::__generic_for_each_selector< _It
>::_M_finish_iterator [inherited]
_Iterator on last element processed; needed for some algorithms (e. g. std::transform()). note the [inherited] tag β she didn't come from this struct, she came from __generic_for_each_selector< _It >, so be nice to her. π
fr fr, _M_finish_iterator is inherited, not her own. don't @ me.
β¨ Author β¨
Generated automatically by Doxygen for libstdc++ from the source code. so likeβ¦ nobody hand-wrote this, a robot did it, and honestly? the robot ate. π
and that's the whole page, bestie! π this little doc came from libstdc++ and the header up top just calls it __gnu_para..._Op, _Tp >(3) because even manpage headers run out of room sometimes π. mwah, go write some parallel replace code. π«Άβ¨πΈ
π¦ where this page comes from
- arch rolling: gcc 16.2.1+r23+gd564253eb6c8-1 Β· GPL-3.0-or-later WITH GCC-exception-3.1 AND GFDL-1.3-or-later
- fedora 44: libstdc++-docs 16.0.1-0.10.fc44 Β· GPL-3.0-or-later AND LGPL-3.0-or-later AND (GPL-3.0-or-later WITH GCC-exception-3.1) AND (GPL-3.0-or-later WITH Texinfo-exception) AND (LGPL-2.1-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GNU-compiler-exception) AND BSL-1.0 AND GFDL-1.3-or-later AND Linux-man-pages-copyleft-2-para AND SunPro AND BSD-1-Clause AND BSD-2-Clause AND BSD-2-Clause-Views AND BSD-3-Clause AND BSD-4-Clause AND BSD-Source-Code AND Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 WITH LLVM-Exception) AND ZPL-2.1 AND ISC AND LicenseRef-Fedora-Public-Domain AND HP-1986 AND curl AND Martin-Birgmeier AND HPND-Markus-Kuhn AND dtoa AND SMLNJ AND AMD-newlib AND OAR AND HPND-merchantability-variant AND HPND-Intel
- fedora 44: libstdc++-docs 16.2.1-2.fc44
- fedora 44: libstdc++-docs 16.2.1-3.fc44 Β· GPL-3.0-or-later AND LGPL-3.0-or-later AND (GPL-3.0-or-later WITH GCC-exception-3.1) AND (GPL-3.0-or-later WITH Texinfo-exception) AND (LGPL-2.1-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GNU-compiler-exception) AND BSL-1.0 AND GFDL-1.3-or-later AND Linux-man-pages-copyleft-2-para AND SunPro AND BSD-1-Clause AND BSD-2-Clause AND BSD-2-Clause-Views AND BSD-3-Clause AND BSD-4-Clause AND BSD-Source-Code AND Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 WITH LLVM-Exception) AND ZPL-2.1 AND ISC AND LicenseRef-Fedora-Public-Domain AND HP-1986 AND curl AND Martin-Birgmeier AND HPND-Markus-Kuhn AND dtoa AND SMLNJ AND AMD-newlib AND OAR AND HPND-merchantability-variant AND HPND-Intel
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms