From c98b29aa6744a9a70b3af2084490fbda97f66cb8 Mon Sep 17 00:00:00 2001 From: Wolfgang Petroschka Date: Fri, 13 Aug 2021 12:49:02 +0200 Subject: [PATCH] Fix empty additional info, 2nd try There's actually a diffent string view type for wide string... --- include/spdlog/async_logger-inl.h | 4 ++++ include/spdlog/logger-inl.h | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/include/spdlog/async_logger-inl.h b/include/spdlog/async_logger-inl.h index 60126cf0..db449d61 100644 --- a/include/spdlog/async_logger-inl.h +++ b/include/spdlog/async_logger-inl.h @@ -80,7 +80,11 @@ SPDLOG_INLINE void spdlog::async_logger::backend_flush_() { sink->flush(); } +#if (defined(SPDLOG_WCHAR_TO_UTF8_SUPPORT) || defined(SPDLOG_WCHAR_FILENAMES)) && defined(_WIN32) + SPDLOG_LOGGER_CATCH(wstring_view_t()) +#else SPDLOG_LOGGER_CATCH(string_view_t()) +#endif } } diff --git a/include/spdlog/logger-inl.h b/include/spdlog/logger-inl.h index b6d02624..9d6e082e 100644 --- a/include/spdlog/logger-inl.h +++ b/include/spdlog/logger-inl.h @@ -203,7 +203,11 @@ SPDLOG_INLINE void logger::flush_() { sink->flush(); } +#if (defined(SPDLOG_WCHAR_TO_UTF8_SUPPORT) || defined(SPDLOG_WCHAR_FILENAMES)) && defined(_WIN32) + SPDLOG_LOGGER_CATCH(wstring_view_t()) +#else SPDLOG_LOGGER_CATCH(string_view_t()) +#endif } }