mirror of
https://github.com/fmtlib/fmt.git
synced 2024-12-02 06:20:09 +00:00
Add default value for None's template argument
This commit is contained in:
parent
d08c4ba84a
commit
4825fb4a0d
12
format.cc
12
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<void> strerror_r(int, char *, ...) {
|
||||
return fmt::internal::None<void>();
|
||||
static inline fmt::internal::None<> strerror_r(int, char *, ...) {
|
||||
return fmt::internal::None<>();
|
||||
}
|
||||
static inline fmt::internal::None<void> strerror_s(char *, std::size_t, ...) {
|
||||
return fmt::internal::None<void>();
|
||||
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<void>) {
|
||||
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<void>) {
|
||||
int fallback(fmt::internal::None<>) {
|
||||
errno = 0;
|
||||
buffer_ = strerror(error_code_);
|
||||
return errno;
|
||||
|
Loading…
Reference in New Issue
Block a user