edit test.cpp

This commit is contained in:
2021-03-09 16:33:27 +09:00
parent 23ffdebe25
commit 51f46a76da
4 changed files with 29 additions and 9 deletions

View File

@ -1,8 +1,8 @@
#include <iostream>
#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<typename T>
class ZtCMy
{ public: enum{EMyNum=1}; };
template<typename T>
class ZtCMy< ZNsMain::ZtCObjList<T> >
{ public: enum{EMyNum=2}; };
int main(int ArgiCnt, char** AppArgu)
{
@ -39,6 +48,15 @@ int main(int ArgiCnt, char** AppArgu)
typedef ZNsMain::ZtCObjList<int> CListByInt;
typedef ZNsMain::ZtCArray <int> CArrayInt ;
typedef ZtCMy<int> CMy1;
typedef ZtCMy<CListByInt> CMy2;
typedef ZtCMy<CArrayInt > CMy3;
cout<<"# CMy1::EMyNum="<<CMy1::EMyNum<<endl;
cout<<"# CMy2::EMyNum="<<CMy2::EMyNum<<endl;
cout<<"# CMy3::EMyNum="<<CMy3::EMyNum<<endl;
CListByInt VO_IntList;
CArrayInt VO_IntArr ;
@ -103,6 +121,8 @@ int main(int ArgiCnt, char** AppArgu)
VO_IntArr .IterElement(&VO_CFunctor1 ); VO_CTuple._1=1 ;
VO_IntArr .IterElement(ZCShowData4::Exec, &VO_CTuple);
cout<< "# Press Any Key to exit" << endl; cin.get();
return 0;
}/*
int main(int ArgiCnt, char** AppArgu)*/