mirror of
https://github.com/fmtlib/fmt.git
synced 2024-12-03 06:41:03 +00:00
Put is_enum check first not to instantiate convert_to_int unnecessarily
This commit is contained in:
parent
8ca3ab2c4c
commit
0ee4273b04
@ -588,7 +588,7 @@ void make_value(const T *p) {
|
|||||||
|
|
||||||
template <typename C, typename T>
|
template <typename C, typename T>
|
||||||
inline typename std::enable_if<
|
inline typename std::enable_if<
|
||||||
convert_to_int<T, typename C::char_type>::value && std::is_enum<T>::value,
|
std::is_enum<T>::value && convert_to_int<T, typename C::char_type>::value,
|
||||||
typed_value<C, int_type>>::type
|
typed_value<C, int_type>>::type
|
||||||
make_value(const T &val) { return static_cast<int>(val); }
|
make_value(const T &val) { return static_cast<int>(val); }
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user