mirror of
https://github.com/fmtlib/fmt.git
synced 2024-11-19 20:18:49 +00:00
Try fixing byte regression
This commit is contained in:
parent
e46392ea2c
commit
2d44577586
@ -1415,17 +1415,20 @@ template <typename Context> struct arg_mapper {
|
||||
}
|
||||
|
||||
template <typename T,
|
||||
FMT_ENABLE_IF(std::is_enum<T>::value &&
|
||||
(std::is_convertible<T, int>::value ||
|
||||
std::is_same<T, detail::byte>::value) &&
|
||||
!has_formatter<T, Context>::value &&
|
||||
!has_fallback_formatter<T, char_type>::value)>
|
||||
FMT_ENABLE_IF(
|
||||
std::is_enum<T>::value&& std::is_convertible<T, int>::value &&
|
||||
!has_formatter<T, Context>::value &&
|
||||
!has_fallback_formatter<T, char_type>::value)>
|
||||
FMT_CONSTEXPR FMT_INLINE auto map(const T& val)
|
||||
-> decltype(std::declval<arg_mapper>().map(
|
||||
static_cast<typename std::underlying_type<T>::type>(val))) {
|
||||
return map(static_cast<typename std::underlying_type<T>::type>(val));
|
||||
}
|
||||
|
||||
FMT_CONSTEXPR FMT_INLINE auto map(detail::byte val) -> unsigned char {
|
||||
return map(static_cast<unsigned char>(val));
|
||||
}
|
||||
|
||||
template <typename T, typename U = remove_cvref_t<T>>
|
||||
struct formattable
|
||||
: bool_constant<has_const_formatter<U, Context>() ||
|
||||
|
Loading…
Reference in New Issue
Block a user