Opened 8 years ago

Closed 8 years ago

#11036 closed Feature Requests (fixed)

make sub_match a Range

Reported by: giel@… Owned by: John Maddock
Milestone: Boost 1.58.0 Component: regex
Version: Boost 1.57.0 Severity: Problem
Keywords: Cc:

Description

boost::sub_match is conceptually already a Range. It already provides the correct typedefs and only misses the begin() and end() iterator retrieval functions.

Alternatively implementing the range_begin(sub_match&) and range_end(sub_match&) functions would achieve the same: http://www.boost.org/doc/libs/1_57_0/libs/range/doc/html/range/reference/extending/method_2.html. That however would not permit direct usage with C++11's foreach, member methods begin() and end() would.

Change History (2)

comment:1 by giel@…, 8 years ago

A patch is available in pull request 11 on boostorg/regex (not putting a link here because it complains about spam and asks me to fill out a captcha which it refuses to display).

comment:2 by John Maddock, 8 years ago

Resolution: fixed
Status: newclosed

Fixed in Git develop.

Note: See TracTickets for help on using tickets.