![]() |
Home | Libraries | People | FAQ | More |
A class or built-in type X
models the Readable Iterator concept for
value type T
if, in addition
to X
being Assignable and
Copy Constructible, the following expressions are valid and respect the stated
semantics. U
is the type
of any specified member of type T
.
Table 1.1. Readable Iterator Requirements (in addition to Assignable and Copy Constructible)
Expression |
Return Type |
Note/Precondition |
---|---|---|
|
|
Any non-reference, non cv-qualified type |
|
Convertible to |
pre: |
|
|
pre: |
A class or built-in type X
models the Writable Iterator concept if,
in addition to X
being Copy
Constructible, the following expressions are valid and respect the stated
semantics. Writable Iterators have an associated set
of value types.
Table 1.2. Writable Iterator Requirements (in addition to Copy Constructible)
Expression |
Return Type |
Precondition |
---|---|---|
|
pre: The type of |
A class or built-in type X
models the Swappable Iterator concept if,
in addition to X
being Copy
Constructible, the following expressions are valid and respect the stated
semantics.
Table 1.3. Swappable Iterator Requirements (in addition to Copy Constructible)
Expression |
Return Type |
Postcondition |
---|---|---|
|
|
the pointed to values are exchanged |
The Lvalue Iterator concept adds the requirement
that the return type of operator*
type be a reference to the value type of
the iterator.
Table 1.4. Lvalue Iterator Requirements
Expression |
Return Type |
Note/Assertion |
---|---|---|
|
|
|