From 5ae1ace8449553a9d2fb10b6d9c643e6ccb05d4a Mon Sep 17 00:00:00 2001 From: gabime Date: Sat, 16 Sep 2023 01:00:55 +0300 Subject: [PATCH] Added loc_with_fmt overload with runtime_format_string --- include/spdlog/common.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/spdlog/common.h b/include/spdlog/common.h index bcb30387..b8740c2a 100644 --- a/include/spdlog/common.h +++ b/include/spdlog/common.h @@ -291,6 +291,13 @@ struct loc_with_fmt : loc(loc) , fmt_string(fmt_str) {} + +#ifndef SPDLOG_USE_STD_FORMAT + constexpr loc_with_fmt(fmt::runtime_format_string fmt_str, source_loc loc = source_loc::current()) noexcept + : loc(loc) + , fmt_string(fmt_str.str) + {} +#endif }; struct file_event_handlers