Fix incorrect references to sub_match having a .last member.

Fixes https://github.com/boostorg/regex/issues/115.
This commit is contained in:
jzmaddock
2020-11-23 17:55:09 +00:00
parent c3ab6405ad
commit da23154da4
9 changed files with 17 additions and 17 deletions

View File

@ -203,7 +203,7 @@
<tr> <tr>
<td> <td>
<p> <p>
<code class="computeroutput"><span class="special">(*</span><span class="identifier">it</span><span class="special">).</span><span class="identifier">prefix</span><span class="special">().</span><span class="identifier">last</span></code> <code class="computeroutput"><span class="special">(*</span><span class="identifier">it</span><span class="special">).</span><span class="identifier">prefix</span><span class="special">().</span><span class="identifier">second</span></code>
</p> </p>
</td> </td>
<td> <td>
@ -240,7 +240,7 @@
<tr> <tr>
<td> <td>
<p> <p>
<code class="computeroutput"><span class="special">(*</span><span class="identifier">it</span><span class="special">).</span><span class="identifier">suffix</span><span class="special">().</span><span class="identifier">last</span></code> <code class="computeroutput"><span class="special">(*</span><span class="identifier">it</span><span class="special">).</span><span class="identifier">suffix</span><span class="special">().</span><span class="identifier">second</span></code>
</p> </p>
</td> </td>
<td> <td>

View File

@ -173,7 +173,7 @@
<tr> <tr>
<td> <td>
<p> <p>
<code class="computeroutput"><span class="identifier">m</span><span class="special">.</span><span class="identifier">prefix</span><span class="special">().</span><span class="identifier">last</span></code> <code class="computeroutput"><span class="identifier">m</span><span class="special">.</span><span class="identifier">prefix</span><span class="special">().</span><span class="identifier">second</span></code>
</p> </p>
</td> </td>
<td> <td>
@ -209,7 +209,7 @@
<tr> <tr>
<td> <td>
<p> <p>
<code class="computeroutput"><span class="identifier">m</span><span class="special">.</span><span class="identifier">suffix</span><span class="special">().</span><span class="identifier">last</span></code> <code class="computeroutput"><span class="identifier">m</span><span class="special">.</span><span class="identifier">suffix</span><span class="special">().</span><span class="identifier">second</span></code>
</p> </p>
</td> </td>
<td> <td>

View File

@ -135,7 +135,7 @@
<p> <p>
calls calls
</p> </p>
<pre class="programlisting"><span class="identifier">std</span><span class="special">::</span><span class="identifier">copy</span><span class="special">(</span><span class="identifier">m</span><span class="special">.</span><span class="identifier">prefix</span><span class="special">().</span><span class="identifier">first</span><span class="special">,</span> <span class="identifier">m</span><span class="special">.</span><span class="identifier">prefix</span><span class="special">().</span><span class="identifier">last</span><span class="special">,</span> <span class="identifier">out</span><span class="special">),</span> <pre class="programlisting"><span class="identifier">std</span><span class="special">::</span><span class="identifier">copy</span><span class="special">(</span><span class="identifier">m</span><span class="special">.</span><span class="identifier">prefix</span><span class="special">().</span><span class="identifier">first</span><span class="special">,</span> <span class="identifier">m</span><span class="special">.</span><span class="identifier">prefix</span><span class="special">().</span><span class="identifier">second</span><span class="special">,</span> <span class="identifier">out</span><span class="special">),</span>
</pre> </pre>
<p> <p>
and then calls and then calls
@ -150,7 +150,7 @@
<p> <p>
calls calls
</p> </p>
<pre class="programlisting"><span class="identifier">std</span><span class="special">::</span><span class="identifier">copy</span><span class="special">(</span><span class="identifier">last_m</span><span class="special">.</span><span class="identifier">suffix</span><span class="special">().</span><span class="identifier">first</span><span class="special">,</span> <span class="identifier">last_m</span><span class="special">,</span><span class="identifier">suffix</span><span class="special">().</span><span class="identifier">last</span><span class="special">,</span> <span class="identifier">out</span><span class="special">)</span> <pre class="programlisting"><span class="identifier">std</span><span class="special">::</span><span class="identifier">copy</span><span class="special">(</span><span class="identifier">last_m</span><span class="special">.</span><span class="identifier">suffix</span><span class="special">().</span><span class="identifier">first</span><span class="special">,</span> <span class="identifier">last_m</span><span class="special">.</span><span class="identifier">suffix</span><span class="special">().</span><span class="identifier">second</span><span class="special">,</span> <span class="identifier">out</span><span class="special">)</span>
</pre> </pre>
<p> <p>
where <span class="emphasis"><em>last_m</em></span> is a copy of the last match found. where <span class="emphasis"><em>last_m</em></span> is a copy of the last match found.

View File

@ -165,7 +165,7 @@
<tr> <tr>
<td> <td>
<p> <p>
<code class="computeroutput"><span class="identifier">m</span><span class="special">.</span><span class="identifier">prefix</span><span class="special">().</span><span class="identifier">last</span></code> <code class="computeroutput"><span class="identifier">m</span><span class="special">.</span><span class="identifier">prefix</span><span class="special">().</span><span class="identifier">second</span></code>
</p> </p>
</td> </td>
<td> <td>
@ -202,7 +202,7 @@
<tr> <tr>
<td> <td>
<p> <p>
<code class="computeroutput"><span class="identifier">m</span><span class="special">.</span><span class="identifier">suffix</span><span class="special">().</span><span class="identifier">last</span></code> <code class="computeroutput"><span class="identifier">m</span><span class="special">.</span><span class="identifier">suffix</span><span class="special">().</span><span class="identifier">second</span></code>
</p> </p>
</td> </td>
<td> <td>

View File

@ -215,7 +215,7 @@
</p> </p>
</div> </div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"><p><small>Last revised: October 12, 2020 at 17:21:16 GMT</small></p></td> <td align="left"><p><small>Last revised: November 23, 2020 at 17:52:46 GMT</small></p></td>
<td align="right"><div class="copyright-footer"></div></td> <td align="right"><div class="copyright-footer"></div></td>
</tr></table> </tr></table>
<hr> <hr>

View File

@ -130,13 +130,13 @@ to a [match_results] object, whose members are set as follows:
[[`(*it).empty()`][`false`]] [[`(*it).empty()`][`false`]]
[[`(*it).prefix().first`][The end of the last match found, or the start [[`(*it).prefix().first`][The end of the last match found, or the start
of the underlying sequence if this is the first match enumerated]] of the underlying sequence if this is the first match enumerated]]
[[`(*it).prefix().last`][The same as the start of the match found: [[`(*it).prefix().second`][The same as the start of the match found:
`(*it)[0].first`]] `(*it)[0].first`]]
[[`(*it).prefix().matched`][True if the prefix did not match an empty string: [[`(*it).prefix().matched`][True if the prefix did not match an empty string:
`(*it).prefix().first != (*it).prefix().second`]] `(*it).prefix().first != (*it).prefix().second`]]
[[`(*it).suffix().first`][The same as the end of the match found: [[`(*it).suffix().first`][The same as the end of the match found:
`(*it)[0].second`]] `(*it)[0].second`]]
[[`(*it).suffix().last`][The end of the underlying sequence.]] [[`(*it).suffix().second`][The end of the underlying sequence.]]
[[`(*it).suffix().matched`][True if the suffix did not match an empty string: [[`(*it).suffix().matched`][True if the suffix did not match an empty string:
`(*it).suffix().first != (*it).suffix().second`]] `(*it).suffix().first != (*it).suffix().second`]]
[[`(*it)[0].first`][The start of the sequence of characters that matched the regular expression]] [[`(*it)[0].first`][The start of the sequence of characters that matched the regular expression]]

View File

@ -85,10 +85,10 @@ given in the table:
[[`m.size()`][`1 + e.mark_count()`]] [[`m.size()`][`1 + e.mark_count()`]]
[[`m.empty()`][`false`]] [[`m.empty()`][`false`]]
[[`m.prefix().first`][`first`]] [[`m.prefix().first`][`first`]]
[[`m.prefix().last`][`first`]] [[`m.prefix().second`][`first`]]
[[`m.prefix().matched`][`false`]] [[`m.prefix().matched`][`false`]]
[[`m.suffix().first`][`last`]] [[`m.suffix().first`][`last`]]
[[`m.suffix().last`][`last`]] [[`m.suffix().second`][`last`]]
[[`m.suffix().matched`][`false`]] [[`m.suffix().matched`][`false`]]
[[`m[0].first`][`first`]] [[`m[0].first`][`first`]]
[[`m[0].second`][`last`]] [[`m[0].second`][`last`]]

View File

@ -97,7 +97,7 @@ Otherwise, for each match found, if
calls calls
std::copy(m.prefix().first, m.prefix().last, out), std::copy(m.prefix().first, m.prefix().second, out),
and then calls and then calls
@ -109,7 +109,7 @@ Finally if
calls calls
std::copy(last_m.suffix().first, last_m,suffix().last, out) std::copy(last_m.suffix().first, last_m.suffix().second, out)
where /last_m/ is a copy of the last match found. where /last_m/ is a copy of the last match found.

View File

@ -83,10 +83,10 @@ are given in the table:
[[`m.size()`][`1 + e.mark_count()`]] [[`m.size()`][`1 + e.mark_count()`]]
[[`m.empty()`][`false`]] [[`m.empty()`][`false`]]
[[`m.prefix().first`][`first`]] [[`m.prefix().first`][`first`]]
[[`m.prefix().last`][`m[0].first`]] [[`m.prefix().second`][`m[0].first`]]
[[`m.prefix().matched`][`m.prefix().first != m.prefix().second`]] [[`m.prefix().matched`][`m.prefix().first != m.prefix().second`]]
[[`m.suffix().first`][`m[0].second`]] [[`m.suffix().first`][`m[0].second`]]
[[`m.suffix().last`][`last`]] [[`m.suffix().second`][`last`]]
[[`m.suffix().matched`][`m.suffix().first != m.suffix().second`]] [[`m.suffix().matched`][`m.suffix().first != m.suffix().second`]]
[[`m[0].first`][The start of the sequence of characters that matched the regular expression]] [[`m[0].first`][The start of the sequence of characters that matched the regular expression]]
[[`m[0].second`][The end of the sequence of characters that matched the regular expression]] [[`m[0].second`][The end of the sequence of characters that matched the regular expression]]