]> git.ipfire.org Git - thirdparty/gcc.git/commit
libstdc++: Do not expose set_brackets/set_separator for formatter with format_kind...
authorTomasz Kamiński <tkaminsk@redhat.com>
Tue, 8 Jul 2025 08:04:41 +0000 (10:04 +0200)
committerTomasz Kamiński <tkaminsk@redhat.com>
Tue, 8 Jul 2025 15:08:46 +0000 (17:08 +0200)
commit70bd97e89ddf8fcb8c14e84a8fd580404536eeb1
tree5fe7d1883c3590dfbfa1a61925d41d22e30e12d3
parent9c600a7e6cc588d2ee79d764cbf69ad677b1bac5
libstdc++: Do not expose set_brackets/set_separator for formatter with format_kind other than sequence [PR119861]

The standard defines separate specializations of range-default-formatter, out
of which only one for range_format::sequence provide the set_brackets and
set_separator methods. We implemented it as one specialization and exposed
this method for range_format other than string or debug_string, i.e. when
range_formatter was used as underlying formatter.

PR libstdc++/119861

libstdc++-v3/ChangeLog:

* include/std/format (formatter<_Rg, _CharT>::set_separator)
(formatter<_Rg, _CharT>::set_brackets): Constrain with
(format_kind<_Rg> == range_format::sequence).
* testsuite/std/format/ranges/pr119861_neg.cc: New test.
libstdc++-v3/include/std/format
libstdc++-v3/testsuite/std/format/ranges/pr119861_neg.cc [new file with mode: 0644]