From cea472eb04ba280f7b8eb8ed1036616b87d1e2f0 Mon Sep 17 00:00:00 2001 From: Stephan Lachnit Date: Mon, 8 Jan 2024 23:00:23 +0100 Subject: [PATCH] source_loc: use std::uint_least32_t to improve support with std::source_location Signed-off-by: Stephan Lachnit --- include/spdlog/common.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/spdlog/common.h b/include/spdlog/common.h index f6fb0fe7..1bf57f97 100644 --- a/include/spdlog/common.h +++ b/include/spdlog/common.h @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include @@ -319,14 +320,14 @@ private: struct source_loc { SPDLOG_CONSTEXPR source_loc() = default; - SPDLOG_CONSTEXPR source_loc(const char *filename_in, int line_in, const char *funcname_in) + SPDLOG_CONSTEXPR source_loc(const char *filename_in, std::uint_least32_t line_in, const char *funcname_in) : filename{filename_in}, line{line_in}, funcname{funcname_in} {} SPDLOG_CONSTEXPR bool empty() const SPDLOG_NOEXCEPT { return line == 0; } const char *filename{nullptr}; - int line{0}; + std::uint_least32_t line{0}; const char *funcname{nullptr}; };