std::experi...es::Readable(3)

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

πŸ’… std::experimental::ranges::Readable β€” C++ Standard Libary manual, page std::experi...es::Readable(3) πŸ’…

okay bestie, welcome to the C++ Standard Libary corner of the man pages. We're looking at std::experimental::ranges::Readable(3) β€” yes, the title is literally std::experimental::ranges::Readable, and the manual name is std::experi...es::Readable(3). It's giving very niche ranges-concept energy, and we're gonna read it together. 🫢


πŸŽ€ NAME πŸŽ€

  • std::experimental::ranges::Readable β€” that's the concept. The original NAME section is literally std::experimental::ranges::Readable and then std::experimental::ranges::Readable again, no extra lore. Slay.

✨ Synopsis ✨

Defined in header <experimental/ranges/iterator>:

template< class In >

concept bool Readable =
    requires {
        typename ranges::value_type_t<In>;
        typename ranges::reference_t<In>;
        typename ranges::rvalue_reference_t<In>;
    } &&
(ranges TS)
    CommonReference<ranges::reference_t<In>&&,
ranges::value_type_t<In>&> &&
    CommonReference<ranges::reference_t<In>&&,
ranges::rvalue_reference_t<In>&&> &&

    CommonReference<ranges::rvalue_reference_t<In>&&, const
ranges::value_type_t<In>&>;

This is the (ranges TS) flavor, btw. The concept Readable is satisfied by types that are readable by applying operator*, such as pointers, smart pointers, and iterators. No cap, that's the whole vibe: if you can dereference it in the readable way, it's in. πŸ’…

lowkey important: the code block above is the synopsis, so keep those template names exactly as written β€” ranges::value_type_t<In>, ranges::reference_t<In>, and ranges::rvalue_reference_t<In> are all doing main-character work here. ✨

mwah πŸ’‹ that's the page. source: http://cppreference.com, version/date: 2024.06.10 β€” and yes, this was std::experi...es::Readable(3) from the C++ Standard Libary manual. bye bestie, go dereference something safely πŸ¦‹πŸ’–

πŸ“¦ where this page comes from