模板元编程例子
#include <iostream>
#include<string>
using namespace std;
template<int N>
class Pow3{
public:
static const int result = 3 * Pow3<N-1>::result;
};
template < >
class Pow3<0>{
public:
static const int result =1;
};
int main(int argc, char *argv[]){
cout << "Pow3<2>::result= "<< Pow3<2>::result << endl;
return 0;
}
简直就是SQL中的语法分析
MySQL限时解答,24小时内友哥专业解答
http://www.yougemysqldba.com
如有进一步需要请联系微信onesoft007
微博账号@友哥一指
http://www.yougemysqldba.com
如有进一步需要请联系微信onesoft007
微博账号@友哥一指
浙公网安备 33010602011771号