https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123901
--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> --- Yes, that seems convincing to me. We could still consider lowering all contiguous iterators to const CharT* pointers, so that we share the same instantiations for std::string::iterator and std::string::const_iterator, and char* and const char*, and iterators into vectors and spans. That wouldn't perform any allocations and wouldn't have any effect on non-contiguous iterators (like your rope use case). And then if we have a single instantiation for all matches on const char* inputs, we could move that into a non-inline function defined inside the library. That could potentially reduce the ABI impact of future optimizations done in the regex executor.
