Re: [Boost-bugs] [Boost C++ Libraries] #3389: Replacement format operator to substitute sequential numbers

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #3389: Replacement format operator to substitute sequential numbers
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2009-10-30 18:51:31


#3389: Replacement format operator to substitute sequential numbers
--------------------------------------------------+-------------------------
  Reporter: Keith MacDonald <keith@…> | Owner: johnmaddock
      Type: Feature Requests | Status: closed
 Milestone: Boost 1.41.0 | Component: regex
   Version: Boost 1.40.0 | Severity: Not Applicable
Resolution: fixed | Keywords: regex format syntax
--------------------------------------------------+-------------------------

Comment(by johnmaddock):

 Keith,

 I think I'm going to close this one as "won't fix" for the following
 reason: the only place to store the needed state would be in the regular
 expression object (it's the only object that's persistant between
 matches), but the regular expression is supposed to be constant and
 immutable so it can be used from multiple threads simultaniously, so it's
 realy not a good place to store this :-(

 That said, I've just added to trunk another feature which may help:
 regex_replace now allows the format string to be not a string at all, but
 a function object. So you can now write and supply your own custom
 functor (with state!) to do the same job.

 HTH, John.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/3389#comment:2>
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