diff --git a/format.cc b/format.cc index e7b3c749..a3b05724 100644 --- a/format.cc +++ b/format.cc @@ -103,11 +103,11 @@ using fmt::internal::Arg; // Dummy implementations of strerror_r and strerror_s called if corresponding // system functions are not available. -static inline fmt::internal::None strerror_r(int, char *, ...) { - return fmt::internal::None(); +static inline fmt::internal::None<> strerror_r(int, char *, ...) { + return fmt::internal::None<>(); } -static inline fmt::internal::None strerror_s(char *, std::size_t, ...) { - return fmt::internal::None(); +static inline fmt::internal::None<> strerror_s(char *, std::size_t, ...) { + return fmt::internal::None<>(); } namespace { @@ -189,7 +189,7 @@ int safe_strerror( } // Handle the case when strerror_r is not available. - int handle(fmt::internal::None) { + int handle(fmt::internal::None<>) { return fallback(strerror_s(buffer_, buffer_size_, error_code_)); } @@ -201,7 +201,7 @@ int safe_strerror( } // Fallback to strerror if strerror_r and strerror_s are not available. - int fallback(fmt::internal::None) { + int fallback(fmt::internal::None<>) { errno = 0; buffer_ = strerror(error_code_); return errno; diff --git a/format.h b/format.h index fb414ca3..6e57047b 100644 --- a/format.h +++ b/format.h @@ -749,7 +749,7 @@ struct Arg : Value { Type type; }; -template +template struct None {}; // A helper class template to enable or disable overloads taking wide