handle a situation in where MSVC uses C++17
always screwing something up
This commit is contained in:
parent
3095a57080
commit
20f322d78c
12
src/log.cpp
12
src/log.cpp
|
@ -99,7 +99,19 @@ int writeLog(int level, const char* msg, fmt::printf_args args) {
|
||||||
int pos=(logPosition.fetch_add(1))&TA_LOG_MASK;
|
int pos=(logPosition.fetch_add(1))&TA_LOG_MASK;
|
||||||
|
|
||||||
#if FMT_VERSION >= 100100
|
#if FMT_VERSION >= 100100
|
||||||
|
#ifdef _MSVC_LANG
|
||||||
|
#if _MSVC_LANG >= 201703L
|
||||||
|
logEntries[pos].text.assign(fmt::vsprintf(std::basic_string_view(msg),args));
|
||||||
|
#else
|
||||||
logEntries[pos].text.assign(fmt::vsprintf(fmt::basic_string_view<char>(msg),args));
|
logEntries[pos].text.assign(fmt::vsprintf(fmt::basic_string_view<char>(msg),args));
|
||||||
|
#endif
|
||||||
|
#else
|
||||||
|
#if __cplusplus >= 201703L
|
||||||
|
logEntries[pos].text.assign(fmt::vsprintf(std::basic_string_view(msg),args));
|
||||||
|
#else
|
||||||
|
logEntries[pos].text.assign(fmt::vsprintf(fmt::basic_string_view<char>(msg),args));
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
#else
|
#else
|
||||||
logEntries[pos].text.assign(fmt::vsprintf(msg,args));
|
logEntries[pos].text.assign(fmt::vsprintf(msg,args));
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue