[PATCH] libstdc++: increment *this instead of this

2024-05-17 Thread Kefu Chai
From: Kefu Chai in _Grapheme_cluster_view::_Iterator, we implement its post-increment operator (a++) using its pre-increment opereator (++a). but we use ++this to call the pre-increment opereator in the implementation of the post-increment operator. one cannot assign to `this`. both GCC and Cla

Re: [PATCH] libstdc++: increment *this instead of this

2024-05-18 Thread Jakub Jelinek
On Sat, May 18, 2024 at 02:53:20PM +0800, Kefu Chai wrote: > libstdc++-v3/ChangeLog: > > * include/bits/unicode.h (enable_borrowed_range): Call ++(*this) > instead of ++this This should be already fixed, see https://gcc.gnu.org/PR115119 Jakub

Re: [PATCH] libstdc++: increment *this instead of this

2024-05-18 Thread Kefu Chai
On Sat, May 18, 2024 at 3:25 PM Jakub Jelinek wrote: > On Sat, May 18, 2024 at 02:53:20PM +0800, Kefu Chai wrote: > > libstdc++-v3/ChangeLog: > > > > * include/bits/unicode.h (enable_borrowed_range): Call ++(*this) > > instead of ++this > > This should be already fixed, see https: