__GNU_PARALLEL::REPLACE_IF_SELECTOR(3)
πΈ NAME πΈ
__gnu_parallel::replace_if_selector β the std::replace() selector, bestie. This page comes from the Library Functions Manual, and it is giving tiny helper-struct energy, no cap.
β¨ SYNOPSIS β¨
Inherits generic_for_each_selector< It >.
π Public Member Functions π
bool operator() (Op &o, It i)β the callable, doing its functor thing.replace_if_selector (const T &new_val)β constructor, and it takes the replacement value.
β Public Attributes β
It finish_iteratorβ inherited, and explained down below.const T & new_valβ the value you are replacing with.
π¦ Detailed Description π¦
Okay so this is the template struct, literally:
template<typename It, typename Op, typename T> struct
__gnu_parallel::replace_if_selector< It, Op, T >
It is the std::replace() selector. Definition at line 158 of file for_each_selectors.h.
π Constructor & Destructor Documentation π
Constructor time, bestie:
template<typename It , typename Op , typename T >
__gnu_parallel::replace_if_selector< It, Op, T >::replace_if_selector
(const T & new_val) [inline, explicit]
It is a constructor. Parameters:
new_valβ value to replace with.
Definition at line 166 of file for_each_selectors.h.
π Member Function Documentation π
The function-call operator, slay:
template<typename It , typename Op , typename T > bool
__gnu_parallel::replace_if_selector< It, Op, T >::operator() (Op & o, It
i) [inline]
What it does: functor execution. Parameters:
oβ operator.iβ iterator referencing object.
Definition at line 172 of file for_each_selectors.h.
References __gnu_parallel::replace_if_selector< It, Op, T >::new_val.
π Member Data Documentation π
First up, the inherited one:
It __gnu_parallel::generic_for_each_selector< It >::finish_iterator
[inherited]
It is the iterator on last element processed; needed for some algorithms (e. g. std::transform()). Definition at line 48 of file for_each_selectors.h.
Then the replacement value itself:
template<typename It , typename Op , typename T > const T&
__gnu_parallel::replace_if_selector< It, Op, T >::new_val
Value to replace with. Definition at line 161 of file for_each_selectors.h.
Referenced by __gnu_parallel::replace_if_selector< It, Op, T >::operator()().
π Author π
Generated automatically by Doxygen for libstdc++ from the source code.
π Cute little sign-off: this page is from libstdc++, dated 21 Apr 2009, and its page name is __gnu_para...if_selector(3). Bye bestie, go replace something iconic! π
π¦ where this page comes from
- nixpkgs unstable: std-man-pages 4.4.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms