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
I'm finding that the compile time format strings via the _format UDL are failing for my user defined types in situations where they have previously worked. Here's a minimal example:
Compilation error on the final UDL format which was passed a l-value foo indicates that fmt has not detected the custom formatter and is trying to use the fallback formatter:
.../fmt-6.0.0/include/fmt/format.h:2503:7: error: use of deleted function ‘fmt::v6::internal::fallback_formatter<T, Char, Enable>::fallback_formatter() [with T = foo&; Char = char; Enable = void]’
Most likely it is failing the has_formatter<T> trait. Since the custom formatter is found when passing a rvalue ("{}"_format(foo{})) perhaps there is a std::decay missing somewhere?
I'm using gcc 8.3.1, and fmt 6.0.0.
The text was updated successfully, but these errors were encountered:
I've found that changing the call to do_check_format_string<> in the udl_formatter template so that it decays the Args parameter pack seems to resolve the problem:
I'm finding that the compile time format strings via the
_format
UDL are failing for my user defined types in situations where they have previously worked. Here's a minimal example:Compilation error on the final UDL format which was passed a l-value foo indicates that
fmt
has not detected the custom formatter and is trying to use the fallback formatter:Most likely it is failing the
has_formatter<T>
trait. Since the custom formatter is found when passing a rvalue ("{}"_format(foo{})
) perhaps there is astd::decay
missing somewhere?I'm using gcc 8.3.1, and fmt 6.0.0.
The text was updated successfully, but these errors were encountered: