The enable_if argument is 3rd.

This commit is contained in:
Barry Revzin 2021-12-07 15:14:26 -06:00
parent 8b89454994
commit e00b508ed1

View File

@ -278,7 +278,7 @@ You can also write a formatter for a hierarchy of classes::
}; };
template <typename T> template <typename T>
struct fmt::formatter<T, std::enable_if_t<std::is_base_of<A, T>::value, char>> : struct fmt::formatter<T, char, std::enable_if_t<std::is_base_of<A, T>::value>> :
fmt::formatter<std::string> { fmt::formatter<std::string> {
template <typename FormatCtx> template <typename FormatCtx>
auto format(const A& a, FormatCtx& ctx) { auto format(const A& a, FormatCtx& ctx) {