This is the mail archive of the gcc-patches@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]

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


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.



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