Namespaces
Variants

operator- (ranges::adjacent_view:: sentinel )

From cppreference.net
Ranges library
Range adaptors
template < bool OtherConst >

requires std:: sized_sentinel_for < ranges:: sentinel_t < Base > ,
ranges:: iterator_t < /*maybe-const*/ < OtherConst, V >>>
friend constexpr ranges:: range_difference_t < /*maybe-const*/ < OtherConst, V >>

operator - ( const /*iterator*/ < OtherConst > & x, const /*sentinel*/ & y ) ;
(1) (C++23以降)
template < bool OtherConst >

requires std:: sized_sentinel_for < ranges:: sentinel_t < Base > ,
ranges:: iterator_t < /*maybe-const*/ < OtherConst, V >>>
friend constexpr ranges:: range_difference_t < /*maybe-const*/ < OtherConst, V >>

operator - ( const /*sentinel*/ & y, const /*iterator*/ < OtherConst > & x ) ;
(2) (C++23以降)

x の基盤となるイテレータと y の基盤となるセンチネル間の距離を計算します。

current_ x 内の基盤となるイテレータ配列とし、 end_ y 内の基盤となる番兵とします。

1) 同等: return x. current_ . back ( ) - y. end_ ;
2) 次と同等: return y. end_ - x. current_ . back ( ) ;

これらの関数テンプレートは通常の unqualified lookup qualified lookup では可視化されず、 adjacent_view:: sentinel が引数の関連クラスである場合にのみ argument-dependent lookup によって発見されます。

目次

パラメータ

x - iterator
y - sentinel

戻り値

x y の間の距離。

関連項目