[PATCH] libstdc++: Avoid hard error in ranges::unique_copy [PR100770]

Tim Song t.canens.cpp@gmail.com
Thu May 27 00:38:29 GMT 2021


On Wed, May 26, 2021 at 2:55 PM Jonathan Wakely <jwakely.gcc@gmail.com> wrote:
>
> On Wed, 26 May 2021 at 20:11, Patrick Palka via Libstdc++
> <libstdc++@gcc.gnu.org> wrote:
> >
> > On Wed, 26 May 2021, Tim Song wrote:
> >
> > > I noticed that output_iterator_wrapper still has a (non-void)
> > > value_type. Perhaps we can get better coverage if it doesn't have one?
> > > The existing tests should have caught this case with that change, at least.
> >
> > Good point, and I guess it should be fine to make its pointer and
> > reference void as well.  I'm testing:
>
> Defining difference_type as void is also OK.

C++20 requires (new-style) output iterators to have a valid
difference_type too (that requirement comes from
weakly_incrementable).


More information about the Libstdc++ mailing list