在GNU编译器下根据系统预置宏,正确识别是否支持char8_t。(注:仅根据文档实现,待LINUX下测试)

This commit is contained in:
2020-07-11 16:13:19 +08:00
parent 50aa9ce555
commit 9191dcb73c
4 changed files with 16 additions and 15 deletions

View File

@@ -34,11 +34,12 @@ namespace hgl
std::cout<<(char *)str.c_str()<<std::endl;
}
// 对于不支持C++20的编译器还得用宏处理一下
// inline void Log(LogLevel ll,const AnsiString &str)
// {
// std::cout<<str.c_str()<<std::endl;
// }
#ifdef HGL_SUPPORT_CHAR8_T
inline void Log(LogLevel ll,const AnsiString &str)
{
std::cout<<str.c_str()<<std::endl;
}
#endif//HGL_SUPPORT_CHAR8_T
inline void DebugLog(LogLevel ll,const UTF16String &str,const char *filename,int line,const char *funcname)
{