std::ranges...k_view::base(3)
std::ranges...k_view::base(3) π
okay so this page is from the C++ Standard Libary (yes, that spelling is literally in the source, bestie, don't come for me) and it's all about std::ranges::chunk_view::base. The title up top is truncated with ... β that's just how it's printed, no cap. β¨
πΈ NAME πΈ
std::ranges::chunk_view::base β std::ranges::chunk_view::base
β¨ Synopsis β¨
constexpr V base() const& requires std::copy_constructible<V>; (1)
(since C++23)
constexpr V base() &&; (2)
(since C++23)
It returns a copy of the underlying view. π
Let base_ be the underlying view.
- Copy constructs the result from the underlying view. Equivalent to
return base_; - Move constructs the result from the underlying view. Equivalent to
return std::move(base_);
π Parameters π
(none)
π Return value π
A copy of the underlying view. That's the whole vibe. π«Ά
π¦ Example π¦
A link to test the example online: Compiler Explorer.
// Run this code
#include <print>
#include <ranges>
int main()
{
static constexpr auto v = {1, 2, 3, 4};
constexpr auto w{std::ranges::chunk_view(v, 2)};
std::println("{}", w.base());
}
π₯ Output π₯
[1, 2, 3, 4]
π that's the whole thing, fr fr. source/version/date, for the record: http://cppreference.com, 2024.06.10, page std::ranges...k_view::base(3) π«Άβ¨
π¦ 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