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

--- Comment #8 from andysem at mail dot ru ---
(In reply to Jonathan Wakely from comment #7)
> (In reply to andysem from comment #6)
> > So do you think this is a problem in Boost.Filesystem?
> 
> I don't know yet, I can't reproduce it with the Boost in Fedora 36, and I
> haven't looked further.

I have added a workaround to the current Boost.Filesystem develop and master,
and Boost 1.80 (the latest official release) didn't support std::string_view,
so is not affected either. In order to reproduce you would need the revision I
posted in the original problem description.

> > I would say this is a regression in string_view as the code is valid in
> > pre-C++23, and I would expect it to stay valid in C++23 onwards.
> 
> That range constructor is explicit in the C++23 draft now, but that change
> hasn't been backordered to GCC 12 yet, and apparently doesn't change
> anything if you still see this in trunk.
> 
> > Shouldn't
> > the range constructor be simply disabled when fs::path::iterator is not
> > defined?
> 
> Do you want ODR violations? Because that's how you get ODR violations.

I understand this, but my point is that this is a breaking change, apparently
even with the constructor being marked explicit, and it breaks in a rather
surprising way. Also, apparently MSVC is able to not break somehow as it
doesn't have this issue. So maybe there is a solution that does not introduce
ODR violations and yet still works. I think it would be preferable to fix
std::string_view rather than all its uses like in std/Boost.Filesystem.

Reply via email to