[PATCH] libstdc++: Use _Drop_iter<_CharT> for formattable concept checking [PR121765]
Jonathan Wakely
jwakely@redhat.com
Wed Sep 10 08:54:11 GMT 2025
On Wed, 10 Sept 2025 at 09:52, Jonathan Wakely <jwakely@redhat.com> wrote:
>
> On Thu, 4 Sept 2025 at 14:39, Tomasz Kaminski <tkaminsk@redhat.com> wrote:
> >> + if constexpr (is_same_v<_Out, _Iter_for_t<_CharT>>)
> >
> > This would be better if we use _Drop_iter here. This is result of me doing some other tests.
>
> Yes, I agree it should be _Drop_iter<_CharT>. That way if we ever
> change the _Iter_for<C>::type to be _Iter_sink<C> this won't break, or
> if we change it to some different type then we will have to explicitly
> consider how to handle that type here (it's safe to ignore _Drop_iter,
> but might not be for some other type).
>
> Alternatively, we could just remove _Iter_for and define
> _Iter_for_t<C> as type_identity_t<_Drop_iter<C>>, or just
> _Drop_iter<C> directly?
>
Actually, not "alternatively". We still need to change the is_same_v
check above.
But we could additionally remove _Iter_for.
More information about the Libstdc++
mailing list