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

Jonathan Wakely jwakely@redhat.com
Sat Oct 29 09:19:00 GMT 2016


On 28/10/16 15:39 -0400, Tim Song wrote:
>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.

Good point, so failing to compile those wonky iterators was OK. Oh
well, let's leave the "fix" for now.




More information about the Libstdc++ mailing list