std::experi...putIterator(3)

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

okay so this is the std::experi...putIterator(3) page, and it lives in the C++ Standard Libary manual (yes bestie, that spelling is the manual's, keep it iconic πŸ’…). It's the Ranges TS concept InputIterator, and it's giving very template, very concept energy ✨.

πŸ’– NAME πŸ’–

std::experimental::ranges::InputIterator β€” literally std::experimental::ranges::InputIterator. The name ate and left no crumbs πŸ˜­πŸ’….

✨ Synopsis ✨

Defined in header <experimental/ranges/iterator>, and here's the exact concept shape, bestie:

          Defined in header <experimental/ranges/iterator>
          template< class I >

          concept bool InputIterator =
              Iterator<I> && Readable<I> &&
       (ranges TS)
              requires { typename ranges::iterator_category_t<I>; } &&

              DerivedFrom<ranges::iterator_category_t<I>,
          ranges::input_iterator_tag>;

So the vibe check is: the InputIterator concept is a refinement of Iterator, adding the requirement that the referenced values can be read (via Readable) and the requirement that the iterator category tag be present. Periodt. πŸ‘‘πŸ’–

  • it's a refinement of Iterator πŸ¦‹
  • it adds the requirement that the referenced values can be read (via Readable) ✨
  • it adds the requirement that the iterator category tag be present πŸ’…

🌸 Notes 🌸

🚨 big note, bestie: unlike the input iterator requirements in the C++ standard, InputIterator in the Ranges TS does not require EqualityComparable. So don't go assuming that requirement is there, fr fr πŸ™ˆπŸ’€.

okay bye bestie 🫢 source/version: http://cppreference.com Β· dated 2024.06.10 Β· mwah πŸ’œβœ¨

πŸ“¦ where this page comes from