From 26b7770b618699078b4a821254ca7f2e52f87d34 Mon Sep 17 00:00:00 2001 From: sauron Date: Thu, 9 Oct 2025 14:31:27 +0900 Subject: [PATCH] commit 2025-10-09 14:31 add size_type in ZtCCharType : ZCppMain/ZtCStringEx.H etc --- ZCppMain/ZMainHead.H | 9 +++++++++ ZCppMain/ZtCStringEx.H | 18 ++++++++++-------- ZCppMain/ZtCStringStd.H | 2 ++ ZCppMainTest/ZtCStringBase_000.cpp | 7 +++++++ 4 files changed, 28 insertions(+), 8 deletions(-) diff --git a/ZCppMain/ZMainHead.H b/ZCppMain/ZMainHead.H index 42f7af5..3741d89 100644 --- a/ZCppMain/ZMainHead.H +++ b/ZCppMain/ZMainHead.H @@ -7502,11 +7502,14 @@ namespace ZNsMain typedef TTypString /*++*/ TypeCStr; typedef typename ZtCCharInt::TypeInt TypeInt ; + typedef typename TypeCStr:: + size_type /*++*/ TypeSize; /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ static const int CI_ByteSize = sizeof(TypeChar); /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ typedef TypeChar char_type ; // for stl string/wstring typedef TypeInt int_type ; // for stl string/wstring + typedef TypeSize size_type ; // for stl string/wstring /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ public: };/* @@ -7517,6 +7520,8 @@ namespace ZNsMain public: typedef std::string /*+++++++*/ TypeCStr; typedef char /*+++++++*/ TypeChar; + typedef typename TypeCStr:: + size_type /*++*/ TypeSize; typedef typename ZtCCharInt::TypeInt TypeInt ; /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ @@ -7524,6 +7529,7 @@ namespace ZNsMain /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ typedef TypeChar char_type ; typedef TypeInt int_type ; + typedef TypeSize size_type ; /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ public: };/* @@ -7536,11 +7542,14 @@ namespace ZNsMain typedef wchar_t /*+++++++*/ TypeChar; typedef typename ZtCCharInt::TypeInt TypeInt ; + typedef typename TypeCStr:: + size_type /*+++++++*/ TypeSize; /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ static const int CI_ByteSize = sizeof(TypeChar); /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ typedef TypeChar char_type ; typedef TypeInt int_type ; + typedef TypeSize size_type ; /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ public: };/* diff --git a/ZCppMain/ZtCStringEx.H b/ZCppMain/ZtCStringEx.H index 9f07970..69df29c 100644 --- a/ZCppMain/ZtCStringEx.H +++ b/ZCppMain/ZtCStringEx.H @@ -152,10 +152,12 @@ namespace ZNsMain typedef TTypCh /*//////////////////*/ TypeChar ; static const int CI_ByteSize = sizeof(TypeChar) ; typedef typename - ZtCCharInt::TypeInt TypeInt ; + ZtCCharInt ::TypeInt TypeInt ; + typedef typename TypeCStr::TypeSize TypeSize ; public: typedef TypeChar char_type ; // for stl string/wstring typedef TypeInt int_type ; // for stl string/wstring + typedef TypeSize size_type ; // for stl string/wstring public: };/* class ZtCCharType /*#####################################################*/ @@ -299,18 +301,18 @@ namespace ZNsMain public: typedef TAlloc ZCAllocator ; - /*++++++++++++++++++++++++++++++++++++++++++*/ + /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ typedef TTypCh TypeChar ; typedef const TTypCh TypeCharC ; typedef const TTypCh* TypeCharCP ; typedef const TTypCh* TypeCPChar ; typedef TTypCh* TypePChar ; - /*++++++++++++++++++++++++++++++++++++++++++*/ + /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ typedef TTypeString ZCTypeString; typedef ZtCStringBase ZCStringBase; - /*++++++++++++++++++++++++++++++++++++++++++*/ + /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ typedef ZtCStringBase TypeThis ; - /*++++++++++++++++++++++++++++++++++++++++++*/ + /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ typedef typename ZCTypeString::ZCSearchInfo ZCSearchInfo ; typedef typename ZCTypeString::ZCSearchInfoList ZCSearchInfoList ; typedef typename ZCTypeString::ZCTypeChars ZCTypeChars ; @@ -326,13 +328,13 @@ namespace ZNsMain typedef const ZCChars ZCCharViewC; public: typedef TypeChar TypeData ; - public: - typedef TAlloc TypeAlloc ; typedef ZCStringList TypeList ; public: typedef ZNsMain::ZtCCharType ZCCharType ; - typedef ZNsMain::ZtCCharType traits_type; // for strl string/wstring typedef typename ZCCharType::TypeInt TypeCharInt; + /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ + typedef ZNsMain::ZtCCharType traits_type; // for strl string/wstring + typedef TypeSize size_type ; // for strl string/wstring public: enum EWriteFile // WriteFile() 에서 사용한다. diff --git a/ZCppMain/ZtCStringStd.H b/ZCppMain/ZtCStringStd.H index 601e1ad..091a286 100644 --- a/ZCppMain/ZtCStringStd.H +++ b/ZCppMain/ZtCStringStd.H @@ -26,12 +26,14 @@ namespace ZNsMain typedef ZtCStringStd TypeCStr ; typedef typename TypeCStr::traits_type::char_type TypeChar ; typedef typename TypeCStr::traits_type::int_type TypeInt ; + typedef typename TypeCStr::size_type TypeSize ; /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ static const int CI_ByteSize = sizeof(TypeChar) ; /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ public: typedef TypeChar char_type ; // for stl string/wstring typedef TypeInt int_type ; // for stl string/wstring + typedef TypeSize size_type ; // for stl string/wstring public: };/* class ZtCCharType /*#####################################################*/ diff --git a/ZCppMainTest/ZtCStringBase_000.cpp b/ZCppMainTest/ZtCStringBase_000.cpp index 7719550..550f748 100644 --- a/ZCppMainTest/ZtCStringBase_000.cpp +++ b/ZCppMainTest/ZtCStringBase_000.cpp @@ -66,6 +66,13 @@ namespace ZNsMain cout<<"*****************************************************"<