operator-(ranges::elements_view::sentinel)
ja.cppreference.net から
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++20 から) |
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++20 から) |
x の内部イテレータと y の内部番兵との間の距離を計算します。
これらの関数 テンプレートは、通常の 非修飾 または 修飾名前探索 では可視ではなく、引数依存の名前探索 でのみ、elements_view::sentinel が引数の関連クラスである場合に見つけられます。
パラメータ
| x | - | イテレータ iterator |
| y | - | センチネル |
戻り値
1)
x.
base
(
)
-
y.
base
(
)
2)
y.
base
(
)
-
x.
base
(
)