Re: [Boost-bugs] [Boost C++ Libraries] #3458: Xpressive Library - sub_match does not work on some occasions

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #3458: Xpressive Library - sub_match does not work on some occasions
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2009-09-17 03:55:47


#3458: Xpressive Library - sub_match does not work on some occasions
----------------------------------------------------+-----------------------
  Reporter: Eric Schwarz <master.universe@…> | Owner: eric_niebler
      Type: Bugs | Status: closed
 Milestone: Boost 1.41.0 | Component: xpressive
   Version: Boost 1.40.0 | Severity: Problem
Resolution: invalid | Keywords: xpressive sub_match
----------------------------------------------------+-----------------------
Changes (by eric_niebler):

  * status: new => closed
  * resolution: => invalid

Comment:

 It's not valid to use a regex algorithm to find a pattern in a temporary
 string, as in:

   regex_match( string("2009/09/14 05:30"), what, rex )

 The match_results struct ends up holding iterators into the temporary
 string, which has gone out of scope. See the section in the docs on
 match_results and iterator invalidation.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/3458#comment:1>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:01 UTC