__GNU_PARALLEL::__COUNT_IF_SELECTOR(3cxx)

πŸ’… NAME πŸ’…

__gnu_parallel::__count_if_selector< _It, _Diff > β€” no cap, this is literally the std::count_if() selector ✨

It's a little struct that lives in the __gnu_parallel fam, and its whole personality is being the selector buddy for std::count_if(). 🫢


🌸 SYNOPSIS 🌸

#include <for_each_selectors.h>

Bestie, it inherits from __gnu_parallel::__generic_for_each_selector< _It > β€” so it's getting all that generic-for-each energy from its parent, periodt. πŸ‘‘

πŸŽ€ Public Member Functions πŸŽ€

  • template<typename _Op > _Diff operator() (_Op &__o, _It __i) β€” functor execution, iykyk. This is where the actual doing-the-thing happens. πŸ”₯

πŸ¦‹ Public Attributes πŸ¦‹

  • _It _M_finish_iterator β€” the iterator pointing at the last element processed. It's needed for some algorithms (e. g. std::transform()), so don't come for it. 🫢

✨ Detailed Description ✨

template<typename _It, typename _Diff>
struct __gnu_parallel::__count_if_selector< _It, _Diff >

Okay so this is the std::count_if () selector β€” that's its whole vibe. Template with _It and _Diff, and it's the selector that shows up for count_if duty. πŸ§šπŸ’œ


πŸ’– Member Function Documentation πŸ’–

template<typename _It , typename _Diff > template<typename _Op > _Diff
__gnu_parallel::__count_if_selector< _It, _Diff >::operator() (_Op &
__o, _It __i) [inline]

Functor execution. Yep, that's the job. It's [inline] too, so it's lowkey speedrunning. ⭐

Parameters

  • __o β€” the operator. That's the op. 🀝
  • __i β€” iterator referencing object. It's pointing at the thing, bestie. πŸ‘‰πŸ‘€

Returns

1 if count, 0 if does not count. That's it, that's the whole mood β€” binary queen. πŸ’€βœ¨


πŸ“ Member Data Documentation πŸ“

template<typename _It > _It __gnu_parallel::__generic_for_each_selector< _It
>::_M_finish_iterator [inherited]

This bad boy is inherited from the generic for-each selector, and it's an _Iterator on last element processed β€” and again, it's needed for some algorithms (e. g. std::transform()). Not me repeating myself, it's literally in the docs. πŸ™ˆπŸŒΈ

Heads up: it's marked [inherited], so your __count_if_selector didn't even make this one itself β€” it's borrowed generational wealth from __generic_for_each_selector< _It >. πŸ’…

πŸ‘‘ Author πŸ‘‘

Generated automatically by Doxygen for libstdc++ from the source code. Not a human, not a vibe curator, just Doxygen doing its little robot thing. πŸ€–βœ¨


That's the whole page, bestie β€” and it shipped to you from the libstdc++ manual, section 3cxx, brought to you by the same __gnu_parallel...r< _It, _Diff >(3cxx) header-and-footer combo you saw up top. Slay, go count some things. πŸŒˆπŸ’–