Opened 12 years ago
Closed 12 years ago
#4708 closed Bugs (fixed)
regex::sub_match::length()
Reported by: | Owned by: | John Maddock | |
---|---|---|---|
Milestone: | To Be Determined | Component: | regex |
Version: | Boost 1.44.0 | Severity: | Problem |
Keywords: | regex sub_match length | Cc: |
Description
code does not match documentation. if matched==false length() does not return 0, instead it results in an assertion of "string iterators incompatible" docs state:
static difference_type length(); Effects: returns the length of this matched sub-expression, or 0 if this sub-expression was not matched: matched ? distance(first, second) : 0).
Checked the source, code is broke.
Change History (4)
comment:1 by , 12 years ago
Keywords: | regex sub_match length added |
---|---|
Summary: | reges::sub_match::length() → regex::sub_match::length() |
comment:2 by , 12 years ago
comment:4 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
this also affects the .str() method. if you call matchmissing.str() and there is no such named group, it fails with the same assert.