------- Comment #10 from paolo dot carlini at oracle dot com 2009-12-08 14:15 ------- Since you have specializations for A, you also need, in general, the corresponding definitions:
const int A<0>::i; const int A<1>::i; -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42330