Changes between Initial Version and Version 1 of Ticket #12552, comment 1


Ignore:
Timestamp:
Oct 26, 2016, 6:28:49 PM (6 years ago)
Author:
Marshall Clow

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #12552, comment 1

    initial v1  
    11First, I apologize for the lack of documentation of the changes. That has been corrected, and will appear in  the 1.63.0 release, along with some porting notes. You can see those docs in the develop branch now.
    22
    3 As for "why did I make this change", it's because the previous interface was throwing away useful information - to be precise, the end of the matched range. If you know the length of the pattern that you are searching for,, *and* you have random-access iterators, then recovering the end of the matched range is simple and cheap.  However, that's not always the case.  Consider a matcher that matches against a regular expression.
     3As for "why did I make this change", it's because the previous interface was throwing away useful information - to be precise, the end of the matched range. If you know the length of the pattern that you are searching for, and you have random-access iterators, then recovering the end of the matched range is simple and cheap.  However, that's not always the case.  Consider a matcher that matches against a regular expression.
    44
    55I wrote a blog post about this titled "sometimes you get things wrong" here: https://cplusplusmusings.wordpress.com/2016/02/01/sometimes-you-get-things-wrong/