diff --git a/inc/hgl/platform/compiler/DataTypeWin.h b/inc/hgl/platform/compiler/DataTypeWin.h index a2a23d1..260cc84 100644 --- a/inc/hgl/platform/compiler/DataTypeWin.h +++ b/inc/hgl/platform/compiler/DataTypeWin.h @@ -13,5 +13,12 @@ namespace hgl using float32 =float; using float64 =double; + + #if defined(__cpp_char8_t)||defined(__cpp_lib_char8_t) + #define HGL_SUPPORT_CHAR8_T + using u8char =char8_t; + #else + using u8char =char; + #endif }//namespace hgl #endif//HGL_DATATYPE_WINDOWS_INCLUDE diff --git a/inc/hgl/platform/compiler/Microsoft.h b/inc/hgl/platform/compiler/Microsoft.h index bceeac8..f1ce1ed 100644 --- a/inc/hgl/platform/compiler/Microsoft.h +++ b/inc/hgl/platform/compiler/Microsoft.h @@ -20,13 +20,6 @@ #define HGL_THREAD_LOCAL_STORAGE __declspec(thread) //线程本地储存 //-------------------------------------------------------------------------------------------------- -#if _MSVC_LANG>=201704L //C++20 - #define HGL_SUPPORT_CHAR8_T - using u8char =char8_t; -#else - using u8char =char; -#endif - #define HGL_FMT_I64 "%I64d" #define HGL_FMT_U64 "%I64u" //参考文档最后查阅支持版本为VC2013,网址:http://msdn.microsoft.com/en-us/library/tcxf1dw6.aspx