template function specialization trouble - probably a user error, but...
Alexandre Oliva
aoliva@redhat.com
Fri Sep 17 16:39:00 GMT 2004
On Sep 17, 2004, Nathan Sidwell <nathan@codesourcery.com> wrote:
> Alan Lehotsky wrote:
>> template<> inline T::basetype MASK<T>(int width) ....
> It looks like you're trying to partially specialize a function
> template. There is no such thing.
This is not partial specialization, it's explicit specialization,
which works for both class and function templates. What he's missing
is a `typename' before T::basetype, such that GCC knows it's a
template-dependent type.
--
Alexandre Oliva http://www.ic.unicamp.br/~oliva/
Red Hat Compiler Engineer aoliva@{redhat.com, gcc.gnu.org}
Free Software Evangelist oliva@{lsd.ic.unicamp.br, gnu.org}
More information about the Gcc
mailing list