Boost C++ Libraries: Ticket #9289: Boost1.54/regex doesn't throw exception on invalid pattern (regression) https://svn.boost.org/trac10/ticket/9289 <pre class="wiki">#include &lt;boost/regex.hpp&gt; main () { boost::regex("{notclosed"); } </pre><p> Above code is essentially part of source-highlight test-suite. Above code is expected to throw boost::regex_error exception. And it did so up-to boost 1.53, with boost 1.54 it no longer throws that. </p> <p> Expected output </p> <pre class="wiki">$ ./a.out terminate called after throwing an instance of 'boost::exception_detail::clone_impl&lt;boost::exception_detail::error_info_injector&lt;boost::regex_error&gt; &gt;' what(): Invalid content of repeat range. The error occurred while parsing the regular expression: '{&gt;&gt;&gt;HERE&gt;&gt;&gt;notclosed'. Aborted (core dumped) $ echo $? 134 </pre><p> Actual with boost1.54 </p> <pre class="wiki">$ ./a.out $ echo $? 0 </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/9289 Trac 1.4.3 Dmitrijs Ledkovs <xnox@…> Tue, 22 Oct 2013 12:41:38 GMT <link>https://svn.boost.org/trac10/ticket/9289#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/9289#comment:1</guid> <description> <p> I guess it's because PERL in the default parser? in that case above is bugfix for <a class="ext-link" href="https://svn.boost.org/trac/boost/ticket/8569"><span class="icon">​</span>https://svn.boost.org/trac/boost/ticket/8569</a> </p> </description> <category>Ticket</category> </item> <item> <author>Dmitrijs Ledkovs <xnox@…></author> <pubDate>Tue, 22 Oct 2013 13:01:50 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/9289#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/9289#comment:2</guid> <description> <p> Never mind, this is not a bug, but rather a bugfix. </p> <p> Adjusted test: </p> <pre class="wiki">#include &lt;boost/regex.hpp&gt; main () { boost::regex("{notclosed"); } </pre><p> fails with all boosts correctly. Please close. </p> </description> <category>Ticket</category> </item> <item> <author>Dmitrijs Ledkovs <xnox@…></author> <pubDate>Tue, 22 Oct 2013 13:05:50 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/9289#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/9289#comment:3</guid> <description> <ul><li>correction </li></ul><pre class="wiki">#include &lt;boost/regex.hpp&gt; main () { boost::regex("["); } </pre><p> fails everywhere. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>John Maddock</dc:creator> <pubDate>Tue, 22 Oct 2013 17:01:16 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/9289#comment:4 https://svn.boost.org/trac10/ticket/9289#comment:4 <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">invalid</span> </li> </ul> Ticket