std::experi...ranges::View(3)

๐Ÿ“ฆ version 2024.07.05, in nixpkgs unstable, opensuse-leap 16.0

std::experimental::ranges::View(3)

okay bestie, this is the std::experimental::ranges::View(3) page from the C++ Standard Libary manual โ€” yes, thatโ€™s the manual name, and weโ€™re folding it in right here instead of copying the whole header line ๐Ÿ’…โœจ

๐ŸŒธ NAME

std::experimental::ranges::View โ€” std::experimental::ranges::View. Thatโ€™s it, thatโ€™s the name โ€” periodt ๐Ÿซถ

โœจ Synopsis

Hereโ€™s the synopsis, preserved with all its ranges TS energy:

Defined in header <experimental/ranges/range>
template< class T >
concept bool View = Range<T> && Semiregular<T> && /* view-predicate<T>   (ranges TS)
*/;
template< class T >
(ranges TS)
struct enable_view {};
struct view_base {};
(ranges TS)

The concept View<T> says the semiregular range T has constant-time copy, move, and assignment operations. Literally iconic for a range type ๐Ÿ’–

Now the /* view-predicate<T> */ part of the concept is determined like this, in order:

  • if the qualified-id ranges::enable_view<T>::type is valid and denotes a type, then itโ€™s ranges::enable_view<T>::type::value;
  • otherwise, if std::is_base_of_v<ranges::view_base, T> is true, then true;
  • otherwise, if T is a specialization of std::initializer_list, std::set, std::multiset, std::unordered_set, or std::unordered_multiset, then false;
  • otherwise, if both T and const T satisfy Range and ranges::reference_t<ranges::iterator_t<T>> is not the same type as ranges::reference_t<ranges::iterator_t<const T>>, then false;
  • otherwise, true.
no extra rules, no sneaky guesses โ€” thatโ€™s the whole vibe check list, bestie ๐ŸŒˆ

mwah ๐Ÿ’– this page came from http://cppreference.com, dated 2024.06.10, and itโ€™s the std::experi...ranges::View(3) manual โ€” bye bestie ๐Ÿซถ

๐Ÿ“ฆ where this page comes from