c++.beta - template-argument 'N' has no value in template function specialization
- Christof Meerwald (30/30) Aug 22 2003 Hi,
Hi, #include <typeinfo> #include <stdio.h> template<class T> struct A { static void f() { printf("%08x %s\n", &A::f, typeid(A).name()); } }; template<class T, int N> struct A<const T[N]> { static void f() { printf("const[]: %08x %s\n", &A::f, typeid(A).name()); } }; int main() { A<const int[2]>::f(); // Error: template-argument 'N' has no value in template function // specialization return 0; } bye, Christof -- http://cmeerw.org JID: cmeerw jabber.at mailto cmeerw at web.de
Aug 22 2003