mirror of
https://github.com/fmtlib/fmt.git
synced 2026-02-16 23:29:57 +08:00
Disble deprecated implicit enum conversions
This commit is contained in:
parent
9121f9b1d3
commit
9ce6480676
@ -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)>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user