std::ranges...:common_view(3)
π std::ranges::common_view::common_view π
okay bestie, welcome to the std::ranges...:common_view(3) page from the C++ Standard Libary manual (their spelling, not mine π). This is the vibe check for the common_view::common_view constructor. β¨
πΈ NAME πΈ
std::ranges::common_view::common_view β that's the name, and the original NAME line says std::ranges::common_view::common_view twice, so we're keeping both: std::ranges::common_view::common_view and std::ranges::common_view::common_view. Iconic repetition, no notes. π
β¨ Synopsis β¨
common_view() = default; (1) (since C++20)
constexpr explicit common_view( V r ); (2) (since C++20)
Constructs a common_view. Periodt. π
- Default constructor. Value-initializes the underlying view. After construction,
base()returns a copy ofV(). So slay, it's all clean and default-y. β¨ - This one takes
r. Initializes the underlying view withstd::move(r). Moving? We love to see it. π«Ά
πΈ Parameters πΈ
rβ underlying view to be adapted into a common-range. That's the whole parameter list, bestie.
π Example π
This section is incomplete Reason: no example
Not me reading a whole Example section just to find out there's no example π. That's literally what it says, so that's what you get.
π¦ Defect reports π¦
The following behavior-changing defect reports were applied retroactively to previously published C++ standards. Yes, retroactively β the lore goes back. π
- DR
LWG 3405Β· applied to C++20- Behavior as published: the redundant converting constructor might cause constraint recursion
- Correct behavior: removed
β Category β
Todo no example
source/version:http://cppreference.comΒ· date:2024.06.10β that's the tea, bestie, mwah π
π¦ 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