#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中的语法分析