forked from fmtlib/fmt
Disble deprecated implicit enum conversions
This commit is contained in:
@@ -1486,6 +1486,7 @@ template <typename Context> struct arg_mapper {
|
|||||||
return values;
|
return values;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef FMT_DEPRECATED_IMPLICIT_ENUMS
|
||||||
template <typename T,
|
template <typename T,
|
||||||
FMT_ENABLE_IF(
|
FMT_ENABLE_IF(
|
||||||
std::is_enum<T>::value&& std::is_convertible<T, int>::value &&
|
std::is_enum<T>::value&& std::is_convertible<T, int>::value &&
|
||||||
@@ -1496,6 +1497,7 @@ template <typename Context> struct arg_mapper {
|
|||||||
static_cast<underlying_t<T>>(val))) {
|
static_cast<underlying_t<T>>(val))) {
|
||||||
return map(static_cast<underlying_t<T>>(val));
|
return map(static_cast<underlying_t<T>>(val));
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
template <typename T, FMT_ENABLE_IF(has_format_as<T>::value &&
|
template <typename T, FMT_ENABLE_IF(has_format_as<T>::value &&
|
||||||
!has_formatter<T, Context>::value)>
|
!has_formatter<T, Context>::value)>
|
||||||
|
Reference in New Issue
Block a user