__GNU_PARALLEL::__GENERATE_SELECTOR(3cxx)

πŸ’… __gnu_parallel::__generate_selector< _It > (3cxx) β€” bestie's guide to the std::generate() selector

okay so real talk, this page is from the <italic>...selector< _It >(3cxx)</italic> corner of the manual (libstdc++'s own little corner, iykyk) and it's literally the whole personality of one tiny struct. Let's get into it 🫢


✨ NAME ✨

__gnu_parallel::__generate_selector< _It > β€” the std::generate() selector. that's it, that's the whole name, and honestly? iconic.


✨ SYNOPSIS ✨

#include <for_each_selectors.h>

Inherits __gnu_parallel::__generic_for_each_selector< _It >. yes bestie, it's a nepo baby β€” it inherits everything from its parent struct and we love that for it πŸ’–

🌸 Public Member Functions 🌸

  • template<typename _Op > bool operator() (_Op &__o, _It __i) β€” functor execution. that's the main character energy right there, the actual "do the thing" moment ⭐

πŸŽ€ Public Attributes πŸŽ€

  • _It _M_finish_iterator β€” the Iterator on last element processed; needed for some algorithms (e. g. std::transform()). it remembers where you stopped, lowkey the responsible friend of the group πŸ’€

πŸ’œ Detailed Description πŸ’œ

template<typename _It>
struct __gnu_parallel::__generate_selector< _It >

It's the std::generate() selector. periodt. like, that's genuinely the whole vibe β€” this struct exists so parallel std::generate() has a selector to do its little selector dance πŸ¦‹


πŸ”₯ Member Function Documentation πŸ”₯

πŸ’« template<typename _It > template<typename _Op > bool __gnu_parallel::__generate_selector< _It >::operator() (_Op & __o, _It __i) [inline]

Functor execution. (inline, no cap β€” it's right there in the header, it doesn't need a whole separate trip to the linker 😭)

Parameters

  • __o β€” Operator.
  • __i β€” iterator referencing object.

ngl that's a very tidy two-argument situation. so clean. so concise. she said "I take an operator and an iterator and I handle it" πŸ‘‘


🧚 Member Data Documentation 🧚

🌈 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()).

it's [inherited], bestie β€” so it lives up in __generic_for_each_selector< _It > and __generate_selector< _It > just gets to use it for free. generational wealth of iterators fr fr πŸ’Έ

heads up: it's the last element processed, not "one past the end" or anything sneaky β€” needed for some algorithms, e. g. std::transform(). don't @ me, that's literally what the page says πŸ™ˆ

🌟 Author 🌟

Generated automatically by Doxygen for libstdc++ from the source code. so nobody hand-wrote this and yet here we are, treating it like a masterpiece ✨


okay that's the whole page, you made it, I'm so proud of you πŸ₯ΉπŸ’– this little selector came straight out of libstdc++ (the __gnu_parallel:...selector< _It >(3cxx) zone β€” you know the one) with a date that the footer keeps to itself, so consider this your cute little sign-off: go forth and generate, bestie. πŸŽ€πŸ’œ