名前空間
変種
操作

operator-(std::basic_const_iterator)

From cppreference.com
 
 
イテレータライブラリ
イテレータのコンセプト
イテレータのプリミティブ
アルゴリズムのコンセプトとユーティリティ
間接呼び出し可能コンセプト
共通アルゴリズム要件
(C++20)
(C++20)
(C++20)
ユーティリティ
(C++20)
イテレータアダプタ
Rangeアクセス
(C++11)(C++14)
(C++14)(C++14)  
(C++11)(C++14)
(C++14)(C++14)  
(C++17)(C++20)
(C++17)
(C++17)
 
 
template< std::sized_sentinel_for<Iter> S >
constexpr difference_type operator-( const S& s ) const;
(1) (C++23から)
template< /*not-a-const-iterator*/ S >

    requires std::sized_sentinel_for<S, Iter>
friend constexpr difference_type

    operator-( const S& s, const basic_const_iterator& i );
(2) (C++23から)

basic_const_iterator とそのセンチネルとの間の距離を返します。

S は、basic_const_iterator の特殊化ではない場合に限り、exposition-only コンセプト /*not-a-const-iterator*/ を満たします。

[編集] パラメータ

i, s - 差を計算するイテレータとセンチネル

[編集] 戻り値

1) base() - s
2) s - i.base()

[編集]

English 日本語 中文(简体) 中文(繁體)