gcc4, namespace and template specialization problem

2005-04-04 Thread tbp
Hello, i'm a bit puzzled by the behaviour of gcc4 (old 4.0 recent 4.1 snapshots) regarding how template specialization should be qualified wrt namespace: namespace dummy { struct foo { template int i void f() {} }; } template void dummy::foo::f666() {}

Re: gcc4, namespace and template specialization problem

2005-04-04 Thread tbp
On Apr 4, 2005 11:54 AM, Nathan Sidwell [EMAIL PROTECTED] wrote: Am i missing something obvious? well, not 'obvious', but that is what [14.7.3]/2 says. I especially don't quite get why specialization have to be defined that way when non specialized version don't have to, ie that is legit:

Re: gcc4, namespace and template specialization problem

2005-04-04 Thread Nathan Sidwell
tbp wrote: On Apr 4, 2005 11:54 AM, Nathan Sidwell [EMAIL PROTECTED] wrote: Am i missing something obvious? well, not 'obvious', but that is what [14.7.3]/2 says. I especially don't quite get why specialization have to be defined that way when non specialized version don't have to, ie that is

Re: gcc4, namespace and template specialization problem

2005-04-04 Thread Jonathan Wakely
On Mon, Apr 04, 2005 at 11:47:56AM +0200, tbp wrote: Hello, i'm a bit puzzled by the behaviour of gcc4 (old 4.0 recent 4.1 snapshots) regarding how template specialization should be qualified wrt namespace: [snip] Other compilers (gcc 3.4.x, msvc2k3, icc8.1) don't whine. GCC 3.4 *does*

Re: gcc4, namespace and template specialization problem

2005-04-04 Thread tbp
On Apr 4, 2005 12:21 PM, Nathan Sidwell [EMAIL PROTECTED] wrote: That's not a declaration, it's a definition of an already declared fn. the case you had was a definition that was _also_ a declaration. [...] See the difference? Yes, and i know about it... Although it is kind of quirky that you

Re: gcc4, namespace and template specialization problem

2005-04-04 Thread tbp
On Apr 4, 2005 12:50 PM, Jonathan Wakely [EMAIL PROTECTED] wrote: GCC 3.4 *does* whine, and I think Intel will in strict mode. Can't get neither gcc 3.4.1 to whine about it (-Wall) nor icc 8.1 with the highest warning level enabled.

Re: gcc4, namespace and template specialization problem

2005-04-04 Thread Jonathan Wakely
On Mon, Apr 04, 2005 at 12:15:07PM +0200, tbp wrote: On Apr 4, 2005 11:54 AM, Nathan Sidwell [EMAIL PROTECTED] wrote: Am i missing something obvious? well, not 'obvious', but that is what [14.7.3]/2 says. I especially don't quite get why specialization have to be defined that way when non

Re: gcc4, namespace and template specialization problem

2005-04-04 Thread Nathan Sidwell
tbp wrote: Sorry for the noise, but i don't own a copy of that byzantine standard. np. to paraphrase another thread 'here's 18$, go get yourself one'[1] nathan [1] available electronically from ansi or iso or some web site. -- Nathan Sidwell:: http://www.codesourcery.com ::

Re: gcc4, namespace and template specialization problem

2005-04-04 Thread Jonathan Wakely
On Mon, Apr 04, 2005 at 01:08:37PM +0200, tbp wrote: On Apr 4, 2005 1:04 PM, Jonathan Wakely [EMAIL PROTECTED] wrote: Hope that helps, Yes, thanks and for once gcc warning was explicit enough (with a hint about namespace) for me to fix it. :-) It might be even better if the error indicated