ConvertibleToRange |
Detailed Description
ConvertibleToRange denotes a sequence of the form: [begin, end)
. The elements of the range are the beginning element to the element before the end element. The following are examples of ranges:
- A container, denotes a range
[container.begin(), container.end())
- An array, denotes a range
[array[0], array[sizeof(array)/sizeof(array[0])])
- An std::pair of iterators denotes a range
[pair.first, pair.last)
- Refinement Of:
- Associated Types:
- Notation:
X
A type that is a model of ConvertibleToRange x
Object of type X
I
A type for iterating over objects of type X
p
,q
Objects of type I
- Definitions:
- Valid Iterator
p
is a valid iterator inx
if it is a valid (nonsingular) iterator that is reachable fromadobe::begin(x)
.
- Valid Range
[p, q)
is a valid range inx
ifp
andq
are valid iterators inx
and ifq
is reachable fromp
.
- Valid Expressions:
- Expression Semantics:
- Complexity Guarantees:
- Invariants:
- Range Size
adobe::size(x)
is equal to the distance fromadobe::begin(x)
toadobe::end(x)
.
- Completeness
- An algorithm that iterates through the range
[adobe::begin(x), adobe::end(x))
will pass through every element ofx
. [1]