libstdc++: Constrain __format::_Iter_sink for contiguous iterators [PR110917]
commitc5ea5aecac323e9094e4dc967f54090cb244bc6a
authorJonathan Wakely <jwakely@redhat.com>
Mon, 7 Aug 2023 13:37:25 +0000 (7 14:37 +0100)
committerJonathan Wakely <jwakely@redhat.com>
Mon, 7 Aug 2023 21:09:11 +0000 (7 22:09 +0100)
treea6138ac96e6714a9aa88912e27d1cf27e30490c7
parentf6ec0d16a32a1799c0f67829fae3687eb75c505b
libstdc++: Constrain __format::_Iter_sink for contiguous iterators [PR110917]

We can't write to a span<_CharT> if the contiguous iterator has a value
type that isn't _CharT.

libstdc++-v3/ChangeLog:

PR libstdc++/110917
* include/std/format (__format::_Iter_sink<CharT, OutIter>):
Constrain partial specialization for contiguous iterators to
require the value type to be CharT.
* testsuite/std/format/functions/format_to.cc: New test.
libstdc++-v3/include/std/format
libstdc++-v3/testsuite/std/format/functions/format_to.cc [new file with mode: 0644]