[Bug c++/42330] undefined reference to "static const int" in class when passing as "const int &" to a function

paolo dot carlini at oracle dot com gcc-bugzilla@gcc.gnu.org
Tue Dec 8 14:15:00 GMT 2009



------- 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



More information about the Gcc-bugs mailing list