Allow match_results::position() to return a valid value for partial matches.

[SVN r34324]
This commit is contained in:
John Maddock
2006-06-17 12:48:03 +00:00
parent b58521163b
commit 2d6fea3308
5 changed files with 21 additions and 13 deletions

View File

@ -300,7 +300,9 @@ difference_type position(unsigned int sub = 0)const;
</pre>
<b></b>
<p><b>Effects:</b> Returns the starting location of sub-expression <EM>sub</EM>,
or -1 if <EM>sub</EM> was not matched <code>.</code></p>
or -1 if <EM>sub</EM> was not matched.&nbsp; Note that if this represents a <A href="partial_matches.html">
partial match</A> , then <code>position()</code> will return the location of
the partial match even though <code>(*this)[0].matched</code> is <EM>false</EM>.</p>
<pre><A name=m6></A>
string_type str(int sub = 0)const;
</pre>