From dce9ade773186b446c2af4e16da10e52f7c3d5ee Mon Sep 17 00:00:00 2001 From: hyzboy Date: Sat, 11 Jul 2020 16:25:36 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=86win=E4=B8=8B=E7=9A=84char8=E5=AE=9A?= =?UTF-8?q?=E4=B9=89=E6=94=B9=E5=88=B0DataTypeWin.h=EF=BC=8C=E4=BF=9D?= =?UTF-8?q?=E6=8C=81=E4=B8=8Egnu=E7=BC=96=E8=AF=91=E5=99=A8=E4=B8=80?= =?UTF-8?q?=E8=87=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- inc/hgl/platform/compiler/DataTypeWin.h | 7 +++++++ inc/hgl/platform/compiler/Microsoft.h | 7 ------- 2 files changed, 7 insertions(+), 7 deletions(-) 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