在GNU编译器下根据系统预置宏,正确识别是否支持char8_t。(注:仅根据文档实现,待LINUX下测试)
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
Reference in New Issue
Block a user