STD::RANGES::ELEMENTS_OF(3cxx)

πŸ“¦ version 16.2.0, in ubuntu stonking

✨ NAME ✨

std::ranges::elements_of< _Range, _Alloc > β€” bestie, this is a lil struct in the C++ standard library and it's literally just vibes and two public members 🫢


πŸ¦‹ SYNOPSIS πŸ¦‹

Okay so first things first, you gotta pull in the header:

#include <generator>

That's the whole entrance fee. No cap. πŸ’…

πŸŽ€ Public Attributes

Two public members, that's it, that's the girlboss:

  • _Alloc allocator β€” an allocator, chillin' right there in public
  • _Range range β€” and a range, also out here in the open for everyone to see

🌸 Detailed Description

Here's the actual declaration, copied character for character so you know exactly what you're dealing with:

template<range _Range, typename _Alloc = allocator<byte>>
struct std::ranges::elements_of< _Range, _Alloc >"

(Yes the trailing quote mark is in there, I don't make the rules, I just report them πŸ™ˆ)

So like β€” it's a template over a _Range that has to satisfy range, and an _Alloc that defaults to allocator<byte>. The way that it bakes the allocator default right into the template parameter list? Iconic. It's giving "here's a range, here's how you want its elements allocated, go off." ✨

⭐ Since

C++23, babes. That's the era. If your compiler is stuck in the past this whole thing is gonna be a no from it. πŸ•°οΈ


πŸ‘‘ Author

This little page was generated automatically by Doxygen for libstdc++ from the source code. Not a human author, not a ghostwriter with a caffeine problem, just Doxygen doing its thing on autopilot. πŸ€–


Reminder bestie: every single flag, member, default and version number above is straight from the source β€” I changed the vibe, not the facts. 🫢

And that's the whole page!! Generated by Doxygen for libstdc++, sitting in the 3cxx manual section β€” the libst footer energy and all. Mwah. Study it, love it, run it, slay. πŸ’–βœ¨πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from