On Mon, Apr 04, 2005 at 01:02:59PM +0100, Jonathan Wakely wrote: > 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 that only the definition > needs to be in the same namespace.
gah! ignore the sentence above, my brain wasn't firing right, this is what I meant: > What I mean is that GCC rejects the following code saying: > > test.cc:7: error: specialization of `template<int i> void dummy::foo::f()' in > different namespace > test.cc:3: error: from definition of `template<int i> void dummy::foo::f()' > > but actually the specialisation and definition are both in the global > namespace: > > namespace dummy { > struct foo { > template <int i> void f(); > }; > } > template <int i> void dummy::foo::f() {} > template<> void dummy::foo::f<666>() {} > > The error is that the specialisation is in a different namespace from > the declaration, not the definitionn. > > Does anyone agree? Should I file a PR? > > jon