A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://en.cppreference.com/w/cpp/language/../../cpp/iterator/basic_const_iterator/operator-.html below:

operator-(std::basic_const_iterator) - cppreference.com

(1) (since 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) (since C++23)

Returns the distance between basic_const_iterator and its sentinel.

S satisfies the exposition-only concept /*not-a-const-iterator*/ if and only if it's not a specialization of basic_const_iterator.

[edit] Parameters i, s - iterator and sentinel to compute the difference of [edit] Return value

1) base() - s

2) s - i.base()

[edit] Example

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4