Extensible Range

Description

A type models Extensible Range if it models Forward Range and supports insertion and clearing.

Refinement of

Forward Range.

Associated Types

See Forward Range.

Notation

R-A type which is a model of Extensible Range
I - The iterator type of R (see Forward Range).
V - The value type of R (see Forward Range).
r-Object of type R
pos-Object of type I
v-Object of type V

Valid Expressions / Semantics

Same as Forward Range, with the following additional requirements:

ExpressionExpression TypeSemanticsPostcondition
clear(r)
void
Clears the range r
size(r) == 0;
begin(r) == end(r);
insert(r, pos, v)
I
Inserts a single element with value v into r after position pos and returns an iterator pointing to the inserted element -

Models


Sha'arei Tefila, an Orthodox Shul (Synagogue) in Salt Lake City, Utah Chabad Lubavitch of Utah