diff --git a/include/fmt/core.h b/include/fmt/core.h index f0426093..542eb1e1 100644 --- a/include/fmt/core.h +++ b/include/fmt/core.h @@ -1300,7 +1300,9 @@ template struct arg_mapper { // We use SFINAE instead of a const T* parameter to avoid conflicting with // the C array overload. template - FMT_CONSTEXPR auto map(T) -> enable_if_t::value, int> { + FMT_CONSTEXPR auto map(T) -> enable_if_t::value && + !has_formatter::value && + !has_fallback_formatter::value, int> { // Formatting of arbitrary pointers is disallowed. If you want to output // a pointer cast it to "void *" or "const void *". In particular, this // forbids formatting of "[const] volatile char *" which is printed as bool