// Utilityクラスtemplate<classT,classU>boolCheckVector(constT&_vector,constU&_begin){returnstd::is_same<std::vector<U>,T>::value;};template<classT,classU>boolCheckList(constT&_list,constU&_begin){returnstd::is_same<std::list<U>,T>::value;};template<classT>boolCheckPointer(constT&_arg){returnstd::is_pointer<T>::value;}template<classT>inlinevoidDelete(T*&_arg){if(!_arg)return;delete_arg;_arg=nullptr;}template<classT>inlinevoidLoopDelete(T&_arg){if(CheckPointer(*_arg.begin())){for(autolist:_arg)Delete(list);}_arg.clear();}template<classT>voidAutoDelete(T&_arg){if(_arg.size()==0)return;if(CheckVector(_arg,*_arg.begin())){LoopDelete(_arg);_arg.shrink_to_fit();if(_arg.capacity()!=0){_RPT0(_CRT_WARN,"It may not have been released properly.\n");_RPTN(_CRT_WARN,"CAPACITY: %d\n",_arg.capacity());}return;};if(CheckList(_arg,*_arg.begin())){LoopDelete(_arg);return;}};template<classT>voidAutoDelete(T*&_pArg){if(_pArg->size()==0)return;if(CheckVector(*_pArg,*(*_pArg).begin())){LoopDelete(*_pArg);_pArg->shrink_to_fit();if(_pArg->capacity()!=0){_RPT0(_CRT_WARN,"It may not have been released properly.\n");_RPTN(_CRT_WARN,"CAPACITY: %d\n",_pArg->capacity());}Delete(_pArg);return;};if(CheckList(*_pArg,*(*_pArg).begin())){LoopDelete(*_pArg);Delete(_pArg);return;}return;};template<classT,class...U>inlinevoidDeleteList(T&_arg,U&..._args){AutoDelete(_arg);DeleteList(std::forward<U>(_args)...);};inlinevoidDeleteList(){};