diff --git a/example/example.cpp b/example/example.cpp index 2ffc354b..77770f45 100644 --- a/example/example.cpp +++ b/example/example.cpp @@ -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; diff --git a/include/spdlog/details/log_attr.h b/include/spdlog/details/log_attr.h index 0a547619..d6fa70d1 100644 --- a/include/spdlog/details/log_attr.h +++ b/include/spdlog/details/log_attr.h @@ -16,13 +16,7 @@ struct is_string template struct is_number : public std::integral_constant::value || std::is_same::value - || std::is_same::value || std::is_same::value - || std::is_same::value || std::is_same::value - - // shorts/chars get converted to int by to_string implicitly. Should we ignore chars but enforce shorts? - || std::is_convertible::value || std::is_convertible::value - + std::is_integral::value // || std::is_floating_point::value > {};