gave up and switched back to is_integral. Most things in to_string get converted implicitly anyways...

pull/2687/head
Bailey Chittle 3 years ago
parent 50369d4b44
commit b8ea4896d9

@ -398,9 +398,9 @@ void attribute_example() {
spdlog::info("EXPERIMENTAL: log with attributes");
spdlog::clear_context();
short s = 0;
unsigned short us = 1;
const int& i = 2;
char s = 0;
int8_t us = 1;
const int16_t& i = 2;
unsigned int ui = 3;
long l = 4;
unsigned long ul = 5;

@ -16,13 +16,7 @@ struct is_string
template<typename T>
struct is_number : public std::integral_constant<bool,
std::is_same<T, int>::value || std::is_same<T, unsigned int>::value
|| std::is_same<T, long>::value || std::is_same<T, unsigned long>::value
|| std::is_same<T, long long>::value || std::is_same<T, unsigned long long>::value
// shorts/chars get converted to int by to_string implicitly. Should we ignore chars but enforce shorts?
|| std::is_convertible<T, int>::value || std::is_convertible<T, unsigned int>::value
std::is_integral<T>::value
// || std::is_floating_point<T>::value
>
{};

Loading…
Cancel
Save