Namespaces
Variants

std::ranges::take_while_view<V,Pred>:: end

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

ranges:: range < const V > &&

std:: indirect_unary_predicate < const Pred, ranges:: iterator_t < const V >> ;
(2) (C++20以降)

ビューの終端を表す sentinel を返します。

base_ を基となるビューとします。

1) 実質的に返すのは /*sentinel*/ < false > ( ranges:: end ( base_ ) , std:: addressof ( pred ( ) ) )
2) 実質的に返すのは /*sentinel*/ < true > ( ranges:: end ( base_ ) , std:: addressof ( pred ( ) ) )

オーバーロード (1) は、 V simple view である場合(つまり、 V const V が同じイテレータ型とセンチネル型を持つビューである場合)、オーバーロード解決に参加しません。

目次

パラメータ

(なし)

戻り値

ビューの終端を表す sentinel

不具合報告

以下の動作変更の欠陥報告書は、以前に公開されたC++規格に対して遡及的に適用されました。

DR 適用対象 公開時の動作 正しい動作
LWG 3450 C++20 const オーバーロードがイテレータと比較不可能なセンチネルを返す可能性がある 制約された

関連項目

先頭を指すイテレータを返す
(公開メンバ関数)
(C++20)
take_while_view::begin から返されたイテレータとセンチネルを比較する
(関数)