[PATCH] Fix filesystem::path for iterators with const value_type

Tim Song t.canens.cpp@gmail.com
Fri Oct 28 19:40:00 GMT 2016


On Fri, Oct 28, 2016 at 1:47 PM, Jonathan Wakely <jwakely@redhat.com> wrote:
> For some reason the Filesystem library says that you can construct
> paths from iterators with value_type that is a possibly const encoded
> character type. I don't know why we support const value_type in this
> place, when normally that is bogus (even const_iterators have a
> non-const value_type, and various algorithms won't compile with const
> value_type).

It doesn't say that. [path.req]/1 says that "the value type shall be
an encoded character type". [path.req]/2 says that the relevant
overloads need not be SFINAE'd away (or equivalent) if the value_type
is a const encoded character type, but doesn't actually say that they
are required to work.



More information about the Libstdc++ mailing list