std::ranges::chunk_view<V>::base
来自cppreference.com
| |
(1) | (C++23 起) |
| |
(2) | (C++23 起) |
令 base_ 为底层视图。
1) 从底层视图复制构造的结果,等价于
return base_;。返回值
底层视图的副本。
示例
示例测试链接: 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());
}
输出:
[1, 2, 3, 4]