Boost C++ Libraries: Ticket #4641: regex_match return true but match_results contain empty entries https://svn.boost.org/trac10/ticket/4641 <p> Hi, Just found a problem with regex when upgrading to boost 1.44.0. Seems like regex_match can return true and match_results contain the correct number of entries, but they are all empty. </p> <p> I downloaded and compiled 1.44.0 on Ubuntu 8.04 using gcc 4.1.3 using the following cmd: ./bootstrap.sh --with-libraries=serialization,regex --includedir=/usr/include --libdir=/usr/lib; bjam </p> <p> Attached is a small testcase extracted from our code base, which gives the following result when compiled and executed: </p> <p> 4 &gt;&lt; &gt;&lt; &gt;&lt; terminate called after throwing an instance of 'boost::exception_detail::clone_impl&lt;boost::exception_detail::error_info_injector&lt;boost::bad_lexical_cast&gt; &gt;' </p> <blockquote> <p> what(): bad lexical cast: source type value could not be interpreted as target </p> </blockquote> <p> Aborted </p> <p> Thanks and regards Jannich </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/4641 Trac 1.4.3 jannich@… Fri, 10 Sep 2010 10:50:35 GMT attachment set https://svn.boost.org/trac10/ticket/4641 https://svn.boost.org/trac10/ticket/4641 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">main.cpp</span> </li> </ul> Ticket jannich@… Fri, 10 Sep 2010 10:56:40 GMT <link>https://svn.boost.org/trac10/ticket/4641#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/4641#comment:1</guid> <description> <p> Forgot to add that this testcase works without problems on Ubuntu 10.04 using gcc 4.4.3 and on RHEL4 using gcc 3.4.6 /Jannich </p> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Fri, 10 Sep 2010 11:57:17 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/4641#comment:2 https://svn.boost.org/trac10/ticket/4641#comment:2 <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">worksforme</span> </li> </ul> <p> Works for me - Ubuntu 8.0 and gcc-4.4.1 </p> <p> Only thing I can think of is that you have multiple Boost versions installed on that machine, and you got a mismatch between headers and libraries. </p> <p> To test this try something like: </p> <p> g++ -I path-to-boost-tree main.cpp path-to-boost-tree/libs/regex/src/*.cpp ./a.out </p> <p> HTH, John. </p> <p> PS please reopen if you can verify this is genuine issue that I can reproduce here. </p> Ticket