https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110917

--- Comment #2 from Arthur O'Dwyer <arthur.j.odwyer at gmail dot com> ---
> Alternatively, we could replace the contiguous_iterator<_OutIter> constraint 
> with constructible_from<span<_CharT>, _OutIter, iter_difference_t<_OutIter>>.

I think `is_same` is preferable to `constructible_from<...>` just because it's
simpler; I wouldn't recommend the hairier thing unless there was a known reason
for it. Doing the hairier thing would immediately trigger a search for the
corner case where it would fail. ;)  (Suppose the author of _OutIter arranges
that sentinel_for<size_t, _OutIter> — maybe that'd do the trick...)


Btw, even though my reduced test case was contrived, it originates from an
actually realistic use-case AFAIK: using `format` to format ASCII text
automatically into an array of char16_t or char32_t (presumably on a platform
with unsigned plain char).

Reply via email to