__GNU_PARALLEL::REPLACE_IF_SELECTOR(3)

πŸ“¦ version 4.4.0, in nixpkgs unstable

🌸 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