Use p2197 format for complex by default

This commit is contained in:
Victor Zverovich
2024-03-19 07:55:45 +09:00
parent bb882c03bc
commit c0dac83982
3 changed files with 7 additions and 7 deletions

View File

@@ -595,8 +595,8 @@ struct formatter<std::complex<F>, Char> : nested_formatter<F, Char> {
template <typename OutputIt>
FMT_CONSTEXPR auto operator()(OutputIt out) -> OutputIt {
auto format =
detail::string_literal<Char, '(', '{', '}', ',', '{', '}', ')'>{};
auto format = detail::string_literal<Char, '(', '{', '}', '+', '{', '}',
'i', ')'>{};
return fmt::format_to(out, basic_string_view<Char>(format),
f->nested(c.real()), f->nested(c.imag()));
}