Namespaces
Variants

std::ranges::stride_view<V>:: end

From cppreference.net
Ranges library
Range adaptors
constexpr auto end ( ) requires ( ! /*simple-view*/ < V > ) ;
(1) (C++23以降)
constexpr auto end ( ) const requires ranges:: range < const V >
(2) (C++23以降)

iterator または sentinel を返します。これは stride_view の終端を表します。

base_ stride_ を基底データメンバとする。

1) Const using Const = false ; と定義し、 Base using Base = V ; と定義する。
2) Const using Const = true ; として定義し、 Base using Base = const V ; として定義する。

同等の機能:

if constexpr (ranges::common_range<Base> &&
              ranges::sized_range<Base> &&
              ranges::forward_range<Base>)
{
    auto missing = (stride_ - ranges::distance(base_) % stride_) % stride_;
    return iterator<Const>(this, ranges::end(base_), missing);
}
else if constexpr (ranges::common_range<Base> &&
                   !ranges::bidirectional_range<Base>)
{
    return iterator<Const>(this, ranges::end(base_));
}
else
{
    return std::default_sentinel;
}

目次

パラメータ

(なし)

戻り値

基になるビュー V common_range をモデル化する場合、最後の要素の次を指す イテレータ 。それ以外の場合、終端イテレータと等価比較される std::default_sentinel

注記

stride_view < V > は、基盤となるビュー V common_range をモデル化する場合に、常に common_range をモデル化します。

関連項目

先頭を指すイテレータを返す
(公開メンバ関数)
範囲の終端を示すセンチネルを返す
(カスタマイゼーションポイントオブジェクト)