https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121765
Tomasz Kamiński <tkaminsk at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |tkaminsk at gcc dot gnu.org
--- Comment #2 from Tomasz Kamiński <tkaminsk at gcc dot gnu.org> ---
As a workaround until the issue is fixed consider specifying return type
explicitly,
instead of using auto:
template <>
struct std::formatter<S> : std::formatter<std::pair<int, double>> {
template <typename FormatContext>
typename FormatContext::iterator
format(const S& s, FormatContext& ctx) const {
return std::formatter<std::pair<int, double>>::format(
std::make_pair(s.i, s.d), ctx);
}
};
Example: https://godbolt.org/z/Ga3PKWGjE