diff options
author | Tomasz Kamiński <tkaminsk@redhat.com> | 2025-04-16 15:28:46 +0200 |
---|---|---|
committer | Tomasz Kamiński <tkaminsk@redhat.com> | 2025-04-17 10:50:34 +0200 |
commit | 843b273c6851b71407b116584982b0389be4d6fd (patch) | |
tree | c5c4f1dd35ef260dc9e59c7747faa514854c16d6 /libjava/classpath/lib/javax/management | |
parent | 55620672d77812bb6f1ac8835f0c949680d9c7d0 (diff) | |
download | gcc-843b273c6851b71407b116584982b0389be4d6fd.zip gcc-843b273c6851b71407b116584982b0389be4d6fd.tar.gz gcc-843b273c6851b71407b116584982b0389be4d6fd.tar.bz2 |
libstdc++: Remove dead code in range_formatter::format [PR109162]
Because the _M_format(__rg, __fc) were placed outside of if constexpr,
these method and its children where instantiated, even if
_M_format<const _Range> could be used.
To simplify the if constexpr chain, we introduce a __simply_formattable_range
(name based on simple-view) exposition only concept, that checks if range is
const and mutable formattable and uses same formatter specialization for
references in each case.
PR libstdc++/109162
libstdc++-v3/ChangeLog:
* include/std/format (__format::__simply_formattable_range): Define.
(range_formatter::format): Do not instantiate _M_format for mutable
_Rg if const _Rg can be used.
Reviewed-by: Jonathan Wakely <jwakely@redhat.com>
Signed-off-by: Tomasz Kamiński <tkaminsk@redhat.com>
Diffstat (limited to 'libjava/classpath/lib/javax/management')
0 files changed, 0 insertions, 0 deletions