From: Alexandre Oliva <aoliva@redhat.com>
To: Nathan Sidwell <nathan@codesourcery.com>
Cc: Alan Lehotsky <apl@alum.mit.edu>, gcc@gcc.gnu.org
Subject: Re: template function specialization trouble - probably a user error, but...
Date: Fri, 17 Sep 2004 16:39:00 -0000 [thread overview]
Message-ID: <orpt4kub5k.fsf@free.redhat.lsd.ic.unicamp.br> (raw)
In-Reply-To: <414AD810.1000501@codesourcery.com>
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}
next prev parent reply other threads:[~2004-09-17 16:13 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-09-17 12:27 Alan Lehotsky
2004-09-17 12:44 ` Nathan Sidwell
2004-09-17 16:39 ` Alexandre Oliva [this message]
2004-09-17 16:44 ` Nathan Sidwell
2004-09-18 17:33 ` Alexandre Oliva
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=orpt4kub5k.fsf@free.redhat.lsd.ic.unicamp.br \
--to=aoliva@redhat.com \
--cc=apl@alum.mit.edu \
--cc=gcc@gcc.gnu.org \
--cc=nathan@codesourcery.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).