Re: [PATCH] PR libstdc++/80624 satisfy invariant for char_traits::eof()

2017-06-02 Thread Jonathan Wakely
On 05/05/17 18:05 +0100, Jonathan Wakely wrote: As discussed at http://stackoverflow.com/q/43769773/981959 (and kinda hinted at by http://wg21.link/lwg1200) there's a problem with char_traits::eof() because it returns int_type(-1) which is the same value as u'\u', a valid UTF-16 code point.

Re: [PATCH] PR libstdc++/80624 satisfy invariant for char_traits::eof()

2017-05-08 Thread Jonathan Wakely via gcc-patches
On 08/05/17 12:52 +0200, Florian Weimer via libstdc++ wrote: On 05/08/2017 12:24 PM, Jonathan Wakely wrote: On 08/05/17 11:53 +0200, Florian Weimer via libstdc++ wrote: On 05/05/2017 07:05 PM, Jonathan Wakely wrote: As discussed at http://stackoverflow.com/q/43769773/981959 (and kinda hinted a

Re: [PATCH] PR libstdc++/80624 satisfy invariant for char_traits::eof()

2017-05-08 Thread Florian Weimer via gcc-patches
On 05/08/2017 12:24 PM, Jonathan Wakely wrote: On 08/05/17 11:53 +0200, Florian Weimer via libstdc++ wrote: On 05/05/2017 07:05 PM, Jonathan Wakely wrote: As discussed at http://stackoverflow.com/q/43769773/981959 (and kinda hinted at by http://wg21.link/lwg1200) there's a problem with char_tra

Re: [PATCH] PR libstdc++/80624 satisfy invariant for char_traits::eof()

2017-05-08 Thread Jonathan Wakely via gcc-patches
On 08/05/17 11:53 +0200, Florian Weimer via libstdc++ wrote: On 05/05/2017 07:05 PM, Jonathan Wakely wrote: As discussed at http://stackoverflow.com/q/43769773/981959 (and kinda hinted at by http://wg21.link/lwg1200) there's a problem with char_traits::eof() because it returns int_type(-1) which

Re: [PATCH] PR libstdc++/80624 satisfy invariant for char_traits::eof()

2017-05-08 Thread Jonathan Wakely via gcc-patches
On 08/05/17 09:52 +0200, Stephan Bergmann via libstdc++ wrote: On 05/05/2017 07:05 PM, Jonathan Wakely wrote: As discussed at http://stackoverflow.com/q/43769773/981959 (and kinda hinted at by http://wg21.link/lwg1200) there's a problem with char_traits::eof() because it returns int_type(-1) whi

Re: [PATCH] PR libstdc++/80624 satisfy invariant for char_traits::eof()

2017-05-08 Thread Florian Weimer via gcc-patches
On 05/05/2017 07:05 PM, Jonathan Wakely wrote: As discussed at http://stackoverflow.com/q/43769773/981959 (and kinda hinted at by http://wg21.link/lwg1200) there's a problem with char_traits::eof() because it returns int_type(-1) which is the same value as u'\u', a valid UTF-16 code point.

Re: [PATCH] PR libstdc++/80624 satisfy invariant for char_traits::eof()

2017-05-08 Thread Stephan Bergmann via gcc-patches
On 05/05/2017 07:05 PM, Jonathan Wakely wrote: As discussed at http://stackoverflow.com/q/43769773/981959 (and kinda hinted at by http://wg21.link/lwg1200) there's a problem with char_traits::eof() because it returns int_type(-1) which is the same value as u'\u', a valid UTF-16 code point. i

[PATCH] PR libstdc++/80624 satisfy invariant for char_traits::eof()

2017-05-05 Thread Jonathan Wakely
As discussed at http://stackoverflow.com/q/43769773/981959 (and kinda hinted at by http://wg21.link/lwg1200) there's a problem with char_traits::eof() because it returns int_type(-1) which is the same value as u'\u', a valid UTF-16 code point. i.e. because all values of int_type are also vali