Re: [Boost-bugs] [Boost C++ Libraries] #7237: Make sub_match a proper range

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #7237: Make sub_match a proper range
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-08-29 03:20:26


#7237: Make sub_match a proper range
-------------------------------------+--------------------------------------
  Reporter: zeratul976@… | Owner: eric_niebler
      Type: Feature Requests | Status: assigned
 Milestone: To Be Determined | Component: xpressive
   Version: Boost 1.51.0 | Severity: Problem
Resolution: | Keywords:
-------------------------------------+--------------------------------------

Comment (by zeratul976@…):

> xpressive's sub_match is closely modeled on std::sub_match, which
 doesn't have the members you refer to

 Right, because ranges haven't been fully standardized. I expect that when
 they are, care will be taken to make things like std::sub_match be a
 Range.

> I would prefer to non-intrusively make sub_match a valid range by
 hooking Boost.Range's customization points.

 That's reasonable.

> would sub_match's const_iterator be a typedef for iterator, or would it
 const-ify the iterator (if necessary)?

 const_iterator should be the type returned when calling begin() on a
 'const sub_match', so the answer depends on whether you think it should be
 allowed to modify the string through a 'const sub_match'. I have no strong
 feelings either way.

> And do I need rbegin/rend, cbegin/cend, crbegin/crend and the associated
 typedefs, too?

 No. Those members are required by the standard Container concept, which is
 a (large) superset of the Range concept. I am not proposing that sub_match
 model Container.

 Thanks!
 Nate

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/7237#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:10 UTC