[Bug c++/99805] [9/10/11 Regression] filesystem::path::parent_path got a wrong path
redi at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Apr 1 21:06:24 GMT 2021
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99805
--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> ---
It would have worked if it used std::as_const(_M_pathname).data() or
_M_pathname.c_str() instead of _M_pathname.data(). It's only the non-const
data() added in C++17 which reallocates (since r261642 anyway).
More information about the Gcc-bugs
mailing list