std::ranges...::operator*(3)
π
std::ranges::transform_view::iterator::operator* π
okay bestie, welcome to the C++ Standard Libary manual, page std::ranges...::operator*(3) β yes, that's the manual name folded in near the top instead of doing the whole header-line copy-paste thing. This one is so niche and so C++20. π¦
β¨ NAME β¨
std::ranges::transform_view::iterator::operator* - std::ranges::transform_view::iterator::operator*
πΈ SYNOPSIS πΈ
constexpr decltype(auto) operator*() const; (since C++20)
Returns the transformed element. periodt. β¨
Effectively returns std::invoke(*parent_->fun_, *current_), where *parent_->fun_ is the transformation function stored in the parent transform_view, and current_ is the underlying iterator into V.
π PARAMETERS π
(none) β literally zero parameters, bestie. π«Ά
π RETURN VALUE π
The transformed element. That's the whole vibe. π
π₯ NOTES π₯
operator->is not provided. Not me looking for it π- The behavior is undefined if the pointer to parent
transform_viewis null (e.g. if*thisis default constructed). - If
*current_is a prvalue, its lifetime ends before this function returns. If the transformation function returns a reference or pointer to it, the result would dangle. π
undefined behavior alert: that's the scary one, no cap. π
π¦ EXAMPLE π¦
This section is incomplete. π
Reason: no example.
π CATEGORY π
Todo no example
π source: http://cppreference.com Β· version/date: 2024.06.10 Β· page: std::ranges...::operator*(3) β bye bestie, go transform something cute ππ
π¦ 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