A Sequence (or, more precisely, an Input Sequence) is a compile-time entity to which you can apply <code><ahref="./Reference/begin.html">begin</a></code>/<code><ahref="./Reference/end.html">end</a></code> operations in order to get iterators for accessing the range of its elements. In general, a sequence does not guarantee that its content doesn't change from one iteration to another, or between different compilation sessions [<ahref="#1">1</a>]. See <ahref="./Forward_Sequence.html">Forward Sequence</a> for the definition of the concept that imposes such additional requirements.
<p>
<h3>Valid expressions</h3>
<p>
<tableborder="1">
<tr><th> Expression </th><th> Expression type </th></tr>
<tr><td><code>typename begin<s>::type</code></td><td>A model of <ahref="./Input_Iterator.html">Input Iterator</a></td></tr>
<tr><td><code>typename end<s>::type</code></td><td>A model of <ahref="./Input_Iterator.html">Input Iterator</a></td></tr>
</table>
<p>
<h3>Expression semantics</h3>
<p>
See the description of <ahref="./Reference/begin.html">begin</a>/<ahref="./Reference/end.html">end</a> operations.
<p>
<h3>Invariants</h3>
<p>
For any sequence <code>s</code> the following invariants always hold:
<ul>
<li><code>[begin<s>::type, end<s>::type)</code> is always a valid range;
<li>an algorithm that iterates through the range <code>[begin<s>::type, end<s>::type)</code> will pass through every element of <code>s</code> (once);
<li><code>begin<s>::type</code> is identical to <code>end<s>::type</code> if and only if the sequence <code>s</code> is empty.
[<aname="1">1</a>] For example, a sequence might implement an interface to a compile-time random-number generator; for such sequence the <code>begin/end</code> invocation might return different iterators on every subsequent compilation of the code.<br>