August 22, 2003 template-argument 'N' has no value in template function specialization | ||||
---|---|---|---|---|
| ||||
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 |
Copyright © 1999-2021 by the D Language Foundation