[Bug libstdc++/107871] _Iter_sink:: _M_overflow missing some difference type casting

2022-12-07 Thread hewillk at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107871 --- Comment #8 from 康桓瑋 --- (In reply to Jonathan Wakely from comment #4) > Maybe you could legally do: > > using difference_type = iterator_t>; > > but maybe just don't do that. If things break when you do dumb things, don't > do those

[Bug libstdc++/107871] _Iter_sink:: _M_overflow missing some difference type casting

2022-12-06 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107871 Jonathan Wakely changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---

[Bug libstdc++/107871] _Iter_sink:: _M_overflow missing some difference type casting

2022-12-06 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107871 --- Comment #6 from CVS Commits --- The master branch has been updated by Jonathan Wakely : https://gcc.gnu.org/g:9cce91a63dcc40cb39e68f6a771e891e51c51946 commit r13-4527-g9cce91a63dcc40cb39e68f6a771e891e51c51946 Author: Jonathan Wakely

[Bug libstdc++/107871] _Iter_sink:: _M_overflow missing some difference type casting

2022-12-05 Thread hewillk at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107871 --- Comment #5 from 康桓瑋 --- (In reply to Jonathan Wakely from comment #4) > Maybe you could legally do: > > using difference_type = iterator_t>; > > but maybe just don't do that. If things break when you do dumb things, don't > do those

[Bug libstdc++/107871] _Iter_sink:: _M_overflow missing some difference type casting

2022-11-26 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107871 --- Comment #4 from Jonathan Wakely --- Maybe you could legally do: using difference_type = iterator_t>; but maybe just don't do that. If things break when you do dumb things, don't do those things.

[Bug libstdc++/107871] _Iter_sink:: _M_overflow missing some difference type casting

2022-11-26 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107871 --- Comment #3 from Jonathan Wakely --- No. They are only allowed to be implementation-defined types, not program-defined types. I can add the casts to make this work, but I don't think it's a real problem that can occur in valid programs.

[Bug libstdc++/107871] _Iter_sink:: _M_overflow missing some difference type casting

2022-11-26 Thread hewillk at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107871 --- Comment #2 from 康桓瑋 --- This is just an example. So, are users not allowed to define integer-like class types?

[Bug libstdc++/107871] _Iter_sink:: _M_overflow missing some difference type casting

2022-11-25 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107871 --- Comment #1 from Jonathan Wakely --- This isn't valid code, you can't use max diff type for your own types. It can only be used by the library for iota_view, but that doesn't have output iterators.