很怪异的c++模板

xiaoxiao2021-02-28  101

#include <cstdlib> #include <iostream> using namespace std; template < class T> struct is_Int{ static const bool value = false; }; template<> struct is_Int<int>{ static const bool value = true; }; template<class T> void Is_int(T param) { if(is_Int<T>::value){ } } int main(int argc, char *argv[]) { system("PAUSE"); return EXIT_SUCCESS; }

 

转载请注明原文地址: https://www.6miu.com/read-74862.html

最新回复(0)