std::experi...reference_t,(3)
Hey bestie π welcome to the std::experi...reference_t,(3) page from the C++ Standard Libary manual. It's giving niche C++ ranges TS realness, and we're gonna keep every crumb.
πΈ NAME πΈ
Ok so the names on this page are exactly these, comma chaos and all:
std::experimental::ranges::reference_t,std::experimental::ranges::rvalue_reference_t,
-
std::experimental::ranges::reference_t,std::experimental::ranges::rvalue_reference_t,
That's the NAME block, bestie. The - is literally in there too. No edits, no cap.
β¨ Synopsis β¨
This whole thing is Defined in header <experimental/ranges/iterator> β iconic header, noted. Here's the synopsis exactly as it appears, including the exposition-only concept and the (1)/(2)/(3) labels:
Defined in header <experimental/ranges/iterator>
template< class T >
(exposition
concept bool /*dereferenceable*/ = requires(T& t) { {*t} -> auto&&;
only*)
};
template< /*dereferenceable*/ T >
(1) (ranges TS)
using reference_t = decltype(*declval<T&>());
template< /*dereferenceable*/ T >
requires requires(T& t) { { ranges::iter_move(t) } -> auto&&; }
(2) (ranges TS)
using rvalue_reference_t =
decltype(ranges::iter_move(declval<T&>()));
template< Readable T >
using iter_common_reference_t =
ranges::common_reference_t<ranges::reference_t<T>,
(3) (ranges TS)
ranges::value_type_t<T>&>;
Let's break down the numbered moments, because they're the main character energy:
- Obtain the reference type of a dereferenceable type
T. - Obtain the rvalue reference type of a dereferenceable type
T, that is, the return type ofranges::iter_move. - Compute a
Readabletype's common reference type. This is the common reference type of its reference type and an lvalue reference to its value type.
π Notes π
Small but important note: the -> auto&& constraint checks that the type of the expression is not void. That's the vibe check right there. π
Okay that's the whole page, bestie π«Ά. Source/version/date tea: http://cppreference.com, 2024.06.10, std::experi...reference_t,(3). Byeeee β¨π
π¦ where this page comes from
- nixpkgs unstable: stdman 2024.07.05
- opensuse-leap 16.0: stdman 2024.07.05-bp160.1.9 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms