将win下的char8定义改到DataTypeWin.h,保持与gnu编译器一致

This commit is contained in:
2020-07-11 16:25:36 +08:00
parent 9191dcb73c
commit dce9ade773
2 changed files with 7 additions and 7 deletions

View File

@@ -13,5 +13,12 @@ namespace hgl
using float32 =float; using float32 =float;
using float64 =double; 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 }//namespace hgl
#endif//HGL_DATATYPE_WINDOWS_INCLUDE #endif//HGL_DATATYPE_WINDOWS_INCLUDE

View File

@@ -20,13 +20,6 @@
#define HGL_THREAD_LOCAL_STORAGE __declspec(thread) //线程本地储存 #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_I64 "%I64d"
#define HGL_FMT_U64 "%I64u" #define HGL_FMT_U64 "%I64u"
//参考文档最后查阅支持版本为VC2013网址http://msdn.microsoft.com/en-us/library/tcxf1dw6.aspx //参考文档最后查阅支持版本为VC2013网址http://msdn.microsoft.com/en-us/library/tcxf1dw6.aspx