Opened 7 years ago
Closed 6 years ago
#12130 closed Bugs (fixed)
utf8 and utf16 implementations of do_regex_match() do not favour captures
| Reported by: | Owned by: | John Maddock | |
|---|---|---|---|
| Milestone: | Boost 1.62.0 | Component: | regex | 
| Version: | Boost 1.60.0 | Severity: | Problem | 
| Keywords: | ICU, captures | Cc: | 
Description
In "icu.hpp", the utf8 and utf16 implementations of do_regex_match() use the copy_results() function which barely assigns "first" and "second" members for each "sub_match". But when BOOST_REGEX_MATCH_EXTRA is defined, sub_match'es contain alos "m_captures" whose content does not get copied inside copy_results(). This leads to empty captures() for all sub_match'es.
the utf32 version uses "match_results" directly, so the problem does not take place.
Change History (1)
comment:1 by , 6 years ago
| Milestone: | To Be Determined → Boost 1.62.0 | 
|---|---|
| Resolution: | → fixed | 
| Status: | new → closed | 
  Note:
 See   TracTickets
 for help on using tickets.
    

Fixed in https://github.com/boostorg/regex/commit/a824b7d236e1084e06a3835d02cacc35772462d1
Thanks for the report!