mirror of
https://github.com/gabime/spdlog.git
synced 2024-12-26 10:31:34 +08:00
Fixed static_assert
This commit is contained in:
parent
b7a6659451
commit
2fa538779f
@ -175,7 +175,7 @@ inline void spdlog::logger::critical(const T &msg)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef SPDLOG_WCHAR_TO_UTF8_SUPPORT
|
#ifdef SPDLOG_WCHAR_TO_UTF8_SUPPORT
|
||||||
static_assert(_WIN32, "SPDLOG_WCHAR_TO_UTF8_SUPPORT only supported on windows");
|
|
||||||
inline void wbuf_to_utf8buf(const fmt::wmemory_buffer &wbuf, fmt::memory_buffer &target)
|
inline void wbuf_to_utf8buf(const fmt::wmemory_buffer &wbuf, fmt::memory_buffer &target)
|
||||||
{
|
{
|
||||||
int wbuf_size = static_cast<int>(wbuf.size());
|
int wbuf_size = static_cast<int>(wbuf.size());
|
||||||
|
@ -68,6 +68,9 @@ public:
|
|||||||
void critical(const char *fmt, const Args &... args);
|
void critical(const char *fmt, const Args &... args);
|
||||||
|
|
||||||
#ifdef SPDLOG_WCHAR_TO_UTF8_SUPPORT
|
#ifdef SPDLOG_WCHAR_TO_UTF8_SUPPORT
|
||||||
|
#ifndef _WIN32
|
||||||
|
#error SPDLOG_WCHAR_TO_UTF8_SUPPORT only supported on windows
|
||||||
|
#else
|
||||||
template<typename... Args>
|
template<typename... Args>
|
||||||
void log(level::level_enum lvl, const wchar_t *fmt, const Args &... args);
|
void log(level::level_enum lvl, const wchar_t *fmt, const Args &... args);
|
||||||
|
|
||||||
@ -88,6 +91,7 @@ public:
|
|||||||
|
|
||||||
template<typename... Args>
|
template<typename... Args>
|
||||||
void critical(const wchar_t *fmt, const Args &... args);
|
void critical(const wchar_t *fmt, const Args &... args);
|
||||||
|
#endif // _WIN32
|
||||||
#endif // SPDLOG_WCHAR_TO_UTF8_SUPPORT
|
#endif // SPDLOG_WCHAR_TO_UTF8_SUPPORT
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
|
Loading…
Reference in New Issue
Block a user