std::ranges::sized_range(3cxx)

πŸ“¦
version 16-20260322 Β· 4 versions
, in ubuntu resolute, ubuntu stonking

✨ std::ranges::sized_range ✨

okay so bestie, welcome to the 3cxx manual page for std::ranges::sized_range πŸ’– this is the libstdc++ corner of the C++ docs, so you know it's giving ✨standard library realness✨.


🌸 NAME 🌸

std::ranges::sized_range β€” [range.sized] the sized_range concept, and yes she's a concept, not a class, not a vibe, a concept πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

First things first, you gotta bring her in:

#include <ranges>

Then, the concept definition itself, no cap:

template<typename _Tp>
concept std::ranges::sized_range =  range<_Tp>
      && requires(_Tp& __t) { ranges::size(__t); }

look at her πŸ¦‹ she's literally just a range<_Tp> that also has to survive a requires clause calling ranges::size(__t) on a _Tp& β€” if that expression checks out, she's in her main character era, if not, she's not a sized_range, periodt.


πŸ’œ Detailed Description πŸ’œ

[range.sized] the sized_range concept. 🌈 that's the whole thing bestie, that's the section. short, sweet, iconic, ate. πŸ‘‘

lowkey the [range.sized] tag is the citation for where this lives in the standard, so if anyone asks, iykyk 🫢

πŸ¦‹ Author πŸ¦‹

generated automatically by Doxygen for libstdc++ straight from the source code πŸŽ€ not a human author, just doxygen doing its little thing, obsessed honestly ✨


and that's the page! this whole thing came to you courtesy of libstdc++ πŸ’– (that's the source/version, mwah) β€” bye bestie, go make something that has a size() πŸ“πŸ§š

πŸ“¦ where this page comes from