From be33f5eb8981084b277c6e6d7d66cbfc8762e907 Mon Sep 17 00:00:00 2001 From: Matthias Moulin Date: Sat, 6 Jul 2019 18:59:45 +0200 Subject: [PATCH] Added wstring_view_t --- include/spdlog/common.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/spdlog/common.h b/include/spdlog/common.h index 2f23e9e4..f0a5736b 100644 --- a/include/spdlog/common.h +++ b/include/spdlog/common.h @@ -94,6 +94,13 @@ template using basic_string_view_t = fmt::basic_string_view; #endif using string_view_t = basic_string_view_t; +#ifdef SPDLOG_WCHAR_TO_UTF8_SUPPORT +#ifndef _WIN32 +#error SPDLOG_WCHAR_TO_UTF8_SUPPORT only supported on windows +#else +using wstring_view_t = basic_string_view_t; +#endif // _WIN32 +#endif // SPDLOG_WCHAR_TO_UTF8_SUPPORT #if defined(SPDLOG_NO_ATOMIC_LEVELS) using level_t = details::null_atomic_int;