Namespaces
Variants

std::ranges::enumerate_view<V>::sentinel<Const>::sentinel

来自 zh.cppreference.net
 
 
范围库
范围适配器
 
 
/*sentinel*/() = default;
(1) (自 C++23)
constexpr /*sentinel*/( /*sentinel*/<!Const> i )
    requires Const &&
        std::convertible_to<ranges::sentinel_t<V>, ranges::sentinel_t<Base>>;
(2) (自 C++23)
private:
constexpr explicit /*sentinel*/( ranges::sentinel_t<Base> end );
(3) (仅用于说明*)

构造一个 sentinel。

1) 默认构造函数。值初始化 底层哨兵为 ranges::sentinel_t<Base>()。
2) 从 /*sentinel*/<false> 转换到 /*sentinel*/<true>。移动构造底层哨兵 end_ 使用 std::move(other.end_)。
3) 一个私有构造函数,由 enumerate_view::end 使用。移动构造 end_ 使用 std::move(end)。此构造函数对用户不可访问。

参数

i - a /*sentinel*/ < false >

示例