This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/77264] [7 Regression] std::string's replace gives wrong results with C++17, works with C++11


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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2016-08-16
     Ever confirmed|0                           |1

--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
We end up in the new replace() overload when we should be in the const char*
one here:

    basic_string&
    replace(size_type __pos, size_type __n, const basic_string& __str)
    { return this->replace(__pos, __n, __str._M_data(), __str.size()); }

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]