From 736c46e660164bf03695b6a3bfb9239235cd3dc3 Mon Sep 17 00:00:00 2001 From: Felix Heitmann Date: Fri, 10 Mar 2023 13:27:53 +0100 Subject: [PATCH] Make it C++11 compatible This is more in line with spdlog --- include/spdlog/details/log_attr.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/spdlog/details/log_attr.h b/include/spdlog/details/log_attr.h index 08b78ba0..6eef1933 100644 --- a/include/spdlog/details/log_attr.h +++ b/include/spdlog/details/log_attr.h @@ -43,12 +43,12 @@ public: , value{v} {} - template - requires std::integral || std::floating_point - attr(string_view_t k, T v) : value{std::to_string(v)} { + template || std::is_floating_point_v, bool> = true> + attr(string_view_t k, T v) + : value{std::to_string(v)} + { key = std::string{k.data(), k.size()}; } - }; } // namespace details