<li>a bidirectional iterator <code>i</code> is <em>decrementable</em> if there is a "previous" iterator, that is, if <code>i::prior</code> expression is well-defined; iterators pointing to the first element of the sequence are not decrementable.
</ul>
<p>
<h3>Valid expressions</h3>
<p>
Bidirectional Iterator both defines a new expression and refines the one described in <ahref="./Forward_Iterator.html">Forward Iterator</a>.
<p>
<tableborder="1">
<tr><th> Expression </th><th> Expression type </th></tr>
<tr><td><code>typename i::next</code></td><td>A model of <ahref="./Bidirectional_Iterator.html">Bidirectional Iterator</a></td></tr>
<tr><td><code>typename i::prior</code></td><td>A model of <ahref="./Bidirectional_Iterator.html">Bidirectional Iterator</a></td></tr>
</table>
<p>
<h3>Expression semantics</h3>
<p>
Semantics of an expression is defined only where it is not defined in <ahref="./Forward_Iterator.html">Forward Iterator</a>.
<tr><td><code>typename i::prior</code></td><td>Amortized constant time</td><td><code>i</code> is decrementable</td><td><code>i::prior</code> is an iterator pointing to the previous element of the sequence</td><td><code>i::prior</code> is dereferencable and incrementable </td></tr>
</table>
<p>
<h3>Invariants</h3>
<p>
For any bidirectional iterators <code>i</code> and <code>j</code> the following invariants always hold:
<p>
<ul>
<li>if <code>i</code> is incrementable, then <code>i::next::prior</code> is a null operation; similarly, if <code>i</code> is decrementable, <code>i::prior::next</code> is a null operation.