From 51f46a76da89abd080258806ddad41eb018680a6 Mon Sep 17 00:00:00 2001 From: sauron Date: Tue, 9 Mar 2021 16:33:27 +0900 Subject: [PATCH] edit test.cpp --- ZCppMain/ZMainHead.H | 2 +- ZCppMain/ZtCArray.H | 2 +- ZCppMain/ZtCObjList.H | 10 +++++----- ZCppMain/test.cpp | 24 ++++++++++++++++++++++-- 4 files changed, 29 insertions(+), 9 deletions(-) diff --git a/ZCppMain/ZMainHead.H b/ZCppMain/ZMainHead.H index 755816f..d789f06 100644 --- a/ZCppMain/ZMainHead.H +++ b/ZCppMain/ZMainHead.H @@ -2382,7 +2382,7 @@ namespace ZNsMain template class ZtCTypeData { public: typedef TType TypeData; static TType& GetObjRef(TType& AR_Type){return AR_Type ;}}; - template<> class ZtCTypeData + template< > class ZtCTypeData { public: typedef void* TypeData; static void* GetObjRef(void* AP_Void){return AP_Void ;}}; diff --git a/ZCppMain/ZtCArray.H b/ZCppMain/ZtCArray.H index d14ac15..2b14c46 100644 --- a/ZCppMain/ZtCArray.H +++ b/ZCppMain/ZtCArray.H @@ -4,7 +4,7 @@ #define __ZTCARRAY_H__ -#include "ZMainHead.H" +#include "ZCppMain/ZMainHead.H" namespace ZNsMain diff --git a/ZCppMain/ZtCObjList.H b/ZCppMain/ZtCObjList.H index 92c13d3..6f9a51a 100644 --- a/ZCppMain/ZtCObjList.H +++ b/ZCppMain/ZtCObjList.H @@ -565,8 +565,8 @@ namespace ZNsMain ZCLink*& APR_TailLink /*///////////*/ ) const { - #ifdef _DEBUG - std::CCheckAlloc::CAllowAlloc VO_CAllowAllocObj; + #ifdef _DEBUG + ZNsMain::ZCCheckAlloc::ZCAllowAlloc VO_CAllowAllocObj; #endif //_DEBUG APR_HeadLink=new ZCLink; ZCLink* VP_TempLink=APR_HeadLink; @@ -595,9 +595,9 @@ namespace ZNsMain { // AL_FarNum 의 절대값 + 1 개의 링크가 생성된다. - #ifdef _DEBUG - std::CCheckAlloc::CAllowAlloc VO_CAllowAllocObj; - #endif + #ifdef _DEBUG + ZNsMain::ZCCheckAlloc::ZCAllowAlloc VO_CAllowAllocObj; + #endif //_DEBUG if(AL_FarNum>0) { diff --git a/ZCppMain/test.cpp b/ZCppMain/test.cpp index 7628fce..6085acb 100644 --- a/ZCppMain/test.cpp +++ b/ZCppMain/test.cpp @@ -1,8 +1,8 @@ #include -#include "ZtCArray.H" -#include "ZtCObjList.H" +#include "ZCppMain/ZtCArray.H" +#include "ZCppMain/ZtCObjList.H" using namespace std ; @@ -30,6 +30,15 @@ namespace ZNsMain{namespace ZNsHide namespace ZNsHide*/}/*namespace ZNsMain*/ +template +class ZtCMy + { public: enum{EMyNum=1}; }; + + +template +class ZtCMy< ZNsMain::ZtCObjList > + { public: enum{EMyNum=2}; }; + int main(int ArgiCnt, char** AppArgu) { @@ -39,6 +48,15 @@ int main(int ArgiCnt, char** AppArgu) typedef ZNsMain::ZtCObjList CListByInt; typedef ZNsMain::ZtCArray CArrayInt ; + typedef ZtCMy CMy1; + typedef ZtCMy CMy2; + typedef ZtCMy CMy3; + + cout<<"# CMy1::EMyNum="<