[Bug c++/14132] New: static template member definition fails

Gabriel Dos Reis gdr@integrable-solutions.net
Thu Feb 12 19:37:00 GMT 2004


"guillaume dot melquiond at ens-lyon dot fr" <gcc-bugzilla@gcc.gnu.org> writes:

| Hi,
| 
| This bug is the same as PR11585 but I'm not convinced by its conclusion. However
| I didn't know if I should have reopened the bug or created a new one.
| 
| The test-case is:
| 
|   template< class T > struct A { static int a; };
|   int A< void >::a;

The second line does not make sense.  Which is why I should ask the
question: What did you want to say by that line?

[...]

| It fails to link with GCC 3.3, 3.4 and ICC 8.0. But removing the "template<>"
| allows the program to cleanly compile and link with both GCC 3.3 and ICC 8.0. So
| what's the solution?

What did you mean to say by that construct?

-- Gaby



More information about the Gcc-bugs mailing list