Fix so works with MSC compiler also

This commit is contained in:
Greg Sjaardema 2019-12-14 12:55:54 -07:00 committed by GitHub
parent e950685455
commit 6a920477f9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -46,6 +46,9 @@ class printf_precision_handler {
template <typename T, FMT_ENABLE_IF(!std::is_integral<T>::value)> template <typename T, FMT_ENABLE_IF(!std::is_integral<T>::value)>
int operator()(T) { int operator()(T) {
FMT_THROW(format_error("precision is not integer")); FMT_THROW(format_error("precision is not integer"));
#if FMT_MSC_VER
return 0;
#endif
} }
}; };
@ -166,6 +169,9 @@ template <typename Char> class printf_width_handler {
template <typename T, FMT_ENABLE_IF(!std::is_integral<T>::value)> template <typename T, FMT_ENABLE_IF(!std::is_integral<T>::value)>
unsigned operator()(T) { unsigned operator()(T) {
FMT_THROW(format_error("width is not integer")); FMT_THROW(format_error("width is not integer"));
#if FMT_MSC_VER
return 0;
#endif
} }
}; };