[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 09:49:00 GMT 2009
------- Comment #3 from redi at gcc dot gnu dot org 2009-12-08 09:48 -------
(In reply to comment #2)
> and i don't want to write lots of "const int A<N>::i"...
You have to, your code is not valid if you use A::i in the program but it has
no definition. This is not a compiler bug.
*** This bug has been marked as a duplicate of 42101 ***
--
redi at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |DUPLICATE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42330
More information about the Gcc-bugs
mailing list