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 } }