You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The text was updated successfully, but these errors were encountered:
chenboshuo
changed the title
error C2338: static_assert fa iled: 'Cannot format an argument. To make type T formattable, provide a formatter<T> specialization. See N4928
error C2338: static_assert failed: 'Cannot format an argument. To make type T formattable, provide a formatter<T> specialization.
Oct 16, 2023
chenboshuo
changed the title
error C2338: static_assert failed: 'Cannot format an argument. To make type T formattable, provide a formatter<T> specialization.
Help wanted: error C2338: static_assert failed: 'Cannot format an argument. To make type T formattable, provide a formatter<T> specialization.
Oct 16, 2023
p.u and p.v are of type SPAparameter, which is implicitly convertible to double.
In short, SPAparameter is not formattable by default and a program-defined std::formatter specialization is needed.
Archaeological records
MSVC STL's historical dispatch mechanism used to accept some forms of implicit conversion to standard floating-point types, so SPAparameter was able to be formatted as double.
PR #3080 added the type checking you encountered and banned formatting unrecognized types.
Finally, the dispatch mechanism was completely rewritten by PR #3745 which implemented LWG-3631.
p.u and p.v are of type SPAparameter, which is implicitly convertible to double.
In short, SPAparameter is not formattable by default and a program-defined std::formatter specialization is needed.
Archaeological records
MSVC STL's historical dispatch mechanism used to accept some forms of implicit conversion to standard floating-point types, so SPAparameter was able to be formatted as double.
PR #3080 added the type checking you encountered and banned formatting unrecognized types.
Finally, the dispatch mechanism was completely rewritten by PR #3745 which implemented LWG-3631.
I encounter this issue again, and this is my code
This code is correct in VS 2019
Originally posted by @chenboshuo in #3860 (comment)
#3860 can't reopen
The text was updated successfully, but these errors were encountered: