1) The sized_sentinel_for
concept specifies that an object of the iterator type I
and an object of the sentinel type S
can be subtracted to compute the distance between them in constant time.
2) The disable_sized_sentinel_for
variable template can be used to prevent iterators and sentinels that can be subtracted but do not actually model sized_sentinel_for
from satisfying the concept.
A program may specialize
disable_sized_sentinel_for
for cv-unqualified non-array object type
S
and
I
, as long as at least one of which is a
program-defined type. Such specializations are usable in
constant expressionsand have type
const bool.
[edit] Semantic requirementsLet i be an iterator of type I
, and s a sentinel of type S
such that [
i,
s)
denotes a range. Let n be the smallest number of applications of ++i necessary to make bool(i == s) be true. I
and S
model sized_sentinel_for<S, I>
only if all following conditions are satisfied:
Expressions declared in requires expressions of the standard library concepts are required to be equality-preserving (except where stated otherwise).
[edit] Implicit expression variationsA requires expression that uses an expression that is non-modifying for some constant lvalue operand also requires implicit expression variations.
[edit] See alsoRetroSearch 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