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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2021-12-12

--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
The problem is that the overload of regex_replace taking a basic_string is
implemented in terms of the one taking a null-terminated string:

  regex_replace(_Out_iter __out, _Bi_iter __first, _Bi_iter __last,
                const basic_regex<_Ch_type, _Rx_traits>& __e,
                const basic_string<_Ch_type, _St, _Sa>& __fmt,
                regex_constants::match_flag_type __flags
                = regex_constants::match_default)
  {
    return regex_replace(__out, __first, __last, __e, __fmt.c_str(), __flags);
  }

Reply via email to