mirror of
https://github.com/fmtlib/fmt.git
synced 2024-11-05 02:27:45 +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>
|
||||
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
|
||||
make_value(const T &val) { return static_cast<int>(val); }
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user