std::experi...::SizedRange(3)

πŸ“¦ version 2024.07.05, in nixpkgs unstable, opensuse-leap 16.0

πŸ’… NAME πŸ’…

std::experimental::ranges::SizedRange β€” okay so bestie, this is the std::experimental::ranges::SizedRange concept, no cap, that's the whole name πŸŽ€

✨ Synopsis ✨

It lives in the header <experimental/ranges/range> (ranges TS), just so we're clear πŸ¦‹

template< class T >
concept bool SizedRange =
    Range<T> &&
    !ranges::disable_sized_range<std::remove_cv_t<std::remove_reference_t<T>>> &&
    requires(T& t) {
        { ranges::size(t) } -> ConvertibleTo<ranges::difference_type_t<ranges::iterator_t<T>>>;
    };

Like, read it slowly, it's giving "main character template" πŸ”₯ β€” SizedRange is a concept bool over class T, it requires Range<T> to hold, it requires that the thing you're passing isn't opted out via !ranges::disable_sized_range<std::remove_cv_t<std::remove_reference_t<T>>>, and then the requires(T& t) clause demands that { ranges::size(t) } converts to ConvertibleTo<ranges::difference_type_t<ranges::iterator_t<T>>>. Periodt πŸ’…

πŸ™ˆ Not me having to tell you this: this section is incomplete. The stated reason is literally "add description and extra caveats" β€” so the docs girlies haven't finished the vibe check on this one yet. Don't come for me, I'm just the messenger 😭

🌸 Category 🌸

  • Todo with reason 🫢

That's genuinely all she wrote, bestie β€” no extra lore, no secret flags, nothing hidden in the group chat πŸ’€

Source: cppreference.com πŸ’– version 2024.06.10 β€” mwah, that's the sign-off, go forth and size your ranges responsibly, ily β­πŸ‘‘πŸŒˆ

πŸ“¦ where this page comes from