diff --git a/ZCppMain/ZMainHead.H b/ZCppMain/ZMainHead.H index 71d4f3c..ef6c675 100644 --- a/ZCppMain/ZMainHead.H +++ b/ZCppMain/ZMainHead.H @@ -1230,10 +1230,12 @@ namespace ZNsMain typedef ZtStTuple CTupleInt2 는 정상이다. 상식적으로도 ZtStTuple 으로 쓸 일은 없다. -- 2021-03-04 16:27 - + + ■ 이젠 ZtStTuple 형태도 가능하다. ZftMakeTuple() 도 추가. - -2025-09-05 21:01 + //////////////////////////////////////////////////////////////////////////////////////////*/ - template< typename Type1 , typename Type2 =void, + template< typename Type1=void, typename Type2 =void, typename Type3=void, typename Type4 =void, typename Type5=void, typename Type6 =void, typename Type7=void, typename Type8 =void, @@ -1241,11 +1243,24 @@ namespace ZNsMain > struct ZtStTuple ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// { - typedef typename ZtCCheckRef::TypeData TypeData1 ; + ZtStTuple(){} + }; + /*###########################################################################################*/ + + + template< typename Type1 + > + struct ZtStTuple /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + { + typedef ZNsMain::ZtCCheckRef CCheckRef1 ; + typedef typename CCheckRef1::TypeData TypeData1 ; TypeData1 _1; - ZtStTuple(TypeData1 _T1) : _1(_T1){} + ZtStTuple(){} + ZtStTuple(Type1 _T1) : + _1(CCheckRef1::PassData(_T1)) + {} }; /*###########################################################################################*/ template< typename Type1, typename Type2 //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -1542,6 +1557,13 @@ namespace ZNsMain /*###########################################################################################*/ + template + ZtStTuple ZftMakeTuple(Type1 _T1) + { + return ZtStTuple(_T1); + }/* + template + ZtStTuple ZftMakeTuple(Type1 _T1)*/ template ZtStTuple ZftMakeTuple(Type1 _T1, Type2 _T2) diff --git a/ZCppMainTest/ZftMakeTuple_000.cpp b/ZCppMainTest/ZftMakeTuple_000.cpp index 2128524..eff179f 100644 --- a/ZCppMainTest/ZftMakeTuple_000.cpp +++ b/ZCppMainTest/ZftMakeTuple_000.cpp @@ -23,6 +23,7 @@ namespace ZNsMain ZCStringStd VO_BuffCStr("myBuff"); ZTypInt VI_NowCnt = 0; + auto myt1 = ZftMakeTuple(1); auto myt2 = ZftMakeTuple(1, 34); auto myt3 = ZftMakeTuple(1, 34, 'C'); auto myt4 = ZftMakeTuple(1, 34, 'C', ZftMCP(VO_BuffCStr)); diff --git a/ZCppMainTest/ZtCThreadEx_000.cpp b/ZCppMainTest/ZtCThreadEx_000.cpp index a4ef6e5..d510d6f 100644 --- a/ZCppMainTest/ZtCThreadEx_000.cpp +++ b/ZCppMainTest/ZtCThreadEx_000.cpp @@ -163,8 +163,8 @@ int main(int AI_ArgCnt, char* APP_ArgVal[])*/ ■ mingw 컴파일 - g++.exe -o ZtCThreadEx_000_mw.exe ZtCThreadEx_000.cpp -I../ - g++.exe -o ZtCThreadEx_000_mw_D.exe ZtCThreadEx_000.cpp -I../ -D_DEBUG + g++.exe -std=c++98 -o ZtCThreadEx_000_mw.exe ZtCThreadEx_000.cpp -I../ + g++.exe -std=c++98 -o ZtCThreadEx_000_mw_D.exe ZtCThreadEx_000.cpp -I../ -D_DEBUG ./ZtCThreadEx_000_mw.exe ./ZtCThreadEx_000_mw_D.exe diff --git a/ZCppMainTest/ZtCThreadEx_001.cpp b/ZCppMainTest/ZtCThreadEx_001.cpp index 79b7fb3..9598011 100644 --- a/ZCppMainTest/ZtCThreadEx_001.cpp +++ b/ZCppMainTest/ZtCThreadEx_001.cpp @@ -163,8 +163,8 @@ int main(int AI_ArgCnt, char* APP_ArgVal[])*/ ■ mingw 컴파일 - g++.exe -o ZtCThreadEx_001_mw.exe ZtCThreadEx_001.cpp -I../ - g++.exe -o ZtCThreadEx_001_mw_D.exe ZtCThreadEx_001.cpp -I../ -D_DEBUG + g++.exe -std=c++98 -o ZtCThreadEx_001_mw.exe ZtCThreadEx_001.cpp -I../ + g++.exe -std=c++98 -o ZtCThreadEx_001_mw_D.exe ZtCThreadEx_001.cpp -I../ -D_DEBUG ./ZtCThreadEx_001_mw.exe ./ZtCThreadEx_001_mw_D.exe