https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123901

Tomasz Kamiński <tkaminsk at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tkaminsk at gcc dot gnu.org

--- Comment #1 from Tomasz Kamiński <tkaminsk at gcc dot gnu.org> ---
I think this would be step in undesired direction, as removes usability of
regexpr for cases when passing bidirectional iterator support is really
required due the program constrains*, at the benefit of optimizing a
constructed/artificial cases, when the string could be construced at call side,
without any issues.

For me the actual benefit of having a generic regexp support, is to be able to
support searching inside a rope like structure, that consists of contingous
segments of strings of various lenght. Due the varied length nature of the
chunks, such strucutre cannot be made random access.

And programs uses such structures, because fitting the whole content of the
string in single chunk of memory is not desirable, or even impossible. As
currently implemented, the regexp will still match correctly on such structure,
and use optimized layout. With proposed change, we will allocate memory anyway,
reversing the design choice of the program.

I think we should not make such decision for the user, and trust they judgment
in the selection of data structures.

Reply via email to