[Bug c++/42330] undefined reference to "static const int" in class when passing as "const int &" to a function
redi at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Tue Dec 8 12:23:00 GMT 2009
------- Comment #6 from redi at gcc dot gnu dot org 2009-12-08 12:23 -------
(In reply to comment #5)
> >
> > template<int N> const A<N>::i;
> >
>
> I tried so, but it seems do not work, could you please explain more detailedly?
> thx~
I missed the "int" out:
template<int N> const int A<N>::i;
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42330
More information about the Gcc-bugs
mailing list