__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_selectordidn'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. ππ
π¦ where this page comes from
- debian trixie: libstdc++-12-doc 12.4.0-5
- debian trixie: libstdc++-13-doc 13.3.0-16
- debian trixie: libstdc++-14-doc 14.2.0-19
- ubuntu noble: libstdc++-10-doc 10.5.0-4ubuntu2
- ubuntu noble: libstdc++-10-doc 10.5.0-4ubuntu2.1
- ubuntu noble: libstdc++-11-doc 11.4.0-9ubuntu1
- ubuntu noble: libstdc++-11-doc 11.5.0-1ubuntu1~24.04.1
- ubuntu noble: libstdc++-12-doc 12.3.0-17ubuntu1
- ubuntu noble: libstdc++-12-doc 12.4.0-2ubuntu1~24.04.1
- ubuntu noble: libstdc++-13-doc 13.2.0-23ubuntu4
- ubuntu noble: libstdc++-13-doc 13.3.0-6ubuntu2~24.04.1
- ubuntu noble: libstdc++-14-doc 14-20240412-0ubuntu1
- ubuntu noble: libstdc++-14-doc 14.2.0-4ubuntu2~24.04.1
- ubuntu questing: libstdc++-11-doc 11.5.0-7ubuntu1
- ubuntu questing: libstdc++-11-doc 11.5.0-7ubuntu1.1
- ubuntu questing: libstdc++-12-doc 12.5.0-6ubuntu1
- ubuntu questing: libstdc++-13-doc 13.4.0-4ubuntu1
- ubuntu questing: libstdc++-14-doc 14.3.0-8ubuntu1
- ubuntu questing: libstdc++-15-doc 15.2.0-4ubuntu4
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms