This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: template function specialization trouble - probably a user error, but...


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}


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]