mirror of
https://github.com/fmtlib/fmt.git
synced 2025-07-30 10:47:35 +02:00
Try fixing byte regression
This commit is contained in:
@ -1415,17 +1415,20 @@ template <typename Context> struct arg_mapper {
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <typename T,
|
template <typename T,
|
||||||
FMT_ENABLE_IF(std::is_enum<T>::value &&
|
FMT_ENABLE_IF(
|
||||||
(std::is_convertible<T, int>::value ||
|
std::is_enum<T>::value&& std::is_convertible<T, int>::value &&
|
||||||
std::is_same<T, detail::byte>::value) &&
|
!has_formatter<T, Context>::value &&
|
||||||
!has_formatter<T, Context>::value &&
|
!has_fallback_formatter<T, char_type>::value)>
|
||||||
!has_fallback_formatter<T, char_type>::value)>
|
|
||||||
FMT_CONSTEXPR FMT_INLINE auto map(const T& val)
|
FMT_CONSTEXPR FMT_INLINE auto map(const T& val)
|
||||||
-> decltype(std::declval<arg_mapper>().map(
|
-> decltype(std::declval<arg_mapper>().map(
|
||||||
static_cast<typename std::underlying_type<T>::type>(val))) {
|
static_cast<typename std::underlying_type<T>::type>(val))) {
|
||||||
return 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>>
|
template <typename T, typename U = remove_cvref_t<T>>
|
||||||
struct formattable
|
struct formattable
|
||||||
: bool_constant<has_const_formatter<U, Context>() ||
|
: bool_constant<has_const_formatter<U, Context>() ||
|
||||||
|
Reference in New Issue
Block a user