书上的一个例子编译不过.C++ Templates一书有这样一小段例子:C/C++ codetemplate int Nclass X {public:
书上的一个例子编译不过. C++ Templates一书有这样一小段例子:
C/C++ code
template <int N>class X { public: typedef int I; void f(int) { }}; template<int N> void fppm(void (X<N>::*p)(typename X<N>::I)); int main() { fppm(&X<33>::f); // fine: N deduced to be 33}