79
79
<span class="keyword">typename</span> <span class="identifier">add_const</span><span class="special"><</span> <span class="identifier">Char</span> <span class="special">></span><span class="special">::</span><span class="identifier">type</span> <span class="special">*</span> format<span class="special">,</span>
80
80
<span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">match_flag_type</span> flags <span class="special">=</span> <span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">match_default</span><span class="special">)</span><span class="special">;</span></pre></div>
83
83
<p>Constructs a <code class="computeroutput">regex_iterator</code> object: <code class="computeroutput">regex_iterator< BidiIter > i(begin, end, re, flags)</code>, and uses <code class="computeroutput">i</code> to enumerate through all of the matches m of type <code class="computeroutput">match_results< BidiIter ></code> that occur within the sequence <code class="computeroutput">[begin, end)</code>. If no such matches are found and <code class="computeroutput">!(flags & format_no_copy)</code> then calls <code class="computeroutput">std::copy(begin, end, out)</code>. Otherwise, for each match found, if <code class="computeroutput">!(flags & format_no_copy)</code> calls <code class="computeroutput">std::copy(m.prefix().first, m.prefix().second, out)</code>, and then calls <code class="computeroutput">m.format(out, format, flags)</code>. Finally if <code class="computeroutput">!(flags & format_no_copy)</code> calls <code class="computeroutput">std::copy(last_m.suffix().first, last_m.suffix().second, out)</code> where <code class="computeroutput">last_m</code> is a copy of the last match found.</p>
84
84
<p>If <code class="computeroutput">flags & format_first_only</code> is non-zero then only the first match found is replaced.</p>