Boost C++ Libraries: Ticket #3632: match_results and singular iterator woes with msvc-10.0 https://svn.boost.org/trac10/ticket/3632 <p> Hi John, I just fixed a similar issue in xpressive and thought that it would probably manifest in your lib, too. Sure enough. The msvc-10.0 beta has new iterator debugging that is very strict. The following code causes a crash in match_results::swap: </p> <pre class="wiki">#include &lt;boost/regex.hpp&gt; int main() { using namespace boost; regex rx("\\w+"); smatch what0, what1; std::string hello("hello"); if(regex_match(hello, what0, rx)) { what0.swap(what1); } } </pre><p> The problem is that what1.m_base is a singular iterator at this point. The swap tries to assign from it, which is verboten. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/3632 Trac 1.4.3 John Maddock Sat, 05 Dec 2009 09:56:12 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/3632#comment:1 https://svn.boost.org/trac10/ticket/3632#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> Sigh... what's really annoying about this is that VC-10 actually appears to be correct in complaining! </p> <p> Fixed in Trunk. </p> <p> Thanks for the heads-up, John. </p> Ticket rwebb <richard.webb@…> Sun, 18 Apr 2010 12:49:07 GMT status, version, milestone changed; resolution deleted https://svn.boost.org/trac10/ticket/3632#comment:2 https://svn.boost.org/trac10/ticket/3632#comment:2 <ul> <li><strong>status</strong> <span class="trac-field-old">closed</span> → <span class="trac-field-new">reopened</span> </li> <li><strong>version</strong> <span class="trac-field-old">Boost 1.40.0</span> → <span class="trac-field-new">Boost Development Trunk</span> </li> <li><strong>resolution</strong> <span class="trac-field-deleted">fixed</span> </li> <li><strong>milestone</strong> <span class="trac-field-old">Boost 1.41.0</span> → <span class="trac-field-new">Boost 1.43.0</span> </li> </ul> <p> There still seems to be a problem with this with the release version of VC10 and the current trunk code - the </p> <p> that.m_base = m_base; </p> <p> on line 407 of match_results.hpp is crashing in the regex_regress regression test, due to being singular. </p> Ticket John Maddock Tue, 20 Apr 2010 16:03:17 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/3632#comment:3 https://svn.boost.org/trac10/ticket/3632#comment:3 <ul> <li><strong>status</strong> <span class="trac-field-old">reopened</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/61430" title="Disambiguate between boost::ref and std:ref etc. Suppress some new ...">[61430]</a>) Disambiguate between boost::ref and std:ref etc. Suppress some new warnings from VC-10. Fix singular iterator logic (fixes VC-10 failures). Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/4114" title="#4114: Bugs: [regex] concept_check regression test failure on c++0x compilers (closed: fixed)">#4114</a>. Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/3632" title="#3632: Bugs: match_results and singular iterator woes with msvc-10.0 (closed: fixed)">#3632</a> </p> Ticket