mirror of
https://github.com/fmtlib/fmt.git
synced 2025-01-28 18:32:46 +00:00
Remove unnecessary instantiations
This commit is contained in:
parent
7755cdc199
commit
585512fc7c
@ -451,19 +451,10 @@ FMT_CONSTEXPR bool is_arithmetic(type t) {
|
|||||||
template <typename T, typename Char, bool ENABLE = true>
|
template <typename T, typename Char, bool ENABLE = true>
|
||||||
struct convert_to_int {
|
struct convert_to_int {
|
||||||
enum {
|
enum {
|
||||||
value = !std::is_arithmetic<T>::value && std::is_convertible<T, int>::value
|
value = !std::is_arithmetic<T>::value && std::is_convertible<T, int>::value
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
#define FMT_DISABLE_CONVERSION_TO_INT(Type) \
|
|
||||||
template <typename Char> \
|
|
||||||
struct convert_to_int<Type, Char> { enum { value = 0 }; }
|
|
||||||
|
|
||||||
// Silence warnings about convering float to int.
|
|
||||||
FMT_DISABLE_CONVERSION_TO_INT(float);
|
|
||||||
FMT_DISABLE_CONVERSION_TO_INT(double);
|
|
||||||
FMT_DISABLE_CONVERSION_TO_INT(long double);
|
|
||||||
|
|
||||||
template <typename Char>
|
template <typename Char>
|
||||||
struct string_value {
|
struct string_value {
|
||||||
const Char *value;
|
const Char *value;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user