#include using namespace std; template class Factorial { public: int operator() () { Factorial f; return N * f(); } }; template <> class Factorial<1> { public: int operator() () { return 1; } }; int main() { Factorial<10> f; cout << f() << endl; }