This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: member templates and default parameter
- To: Nathan Sidwell <nathan at codesourcery dot com>
- Subject: Re: member templates and default parameter
- From: Tim Hollebeek <tim at hollebeek dot com>
- Date: Thu, 22 Mar 2001 08:48:21 -0500
- Cc: Stefan Seefeld <seefeld at sympatico dot ca>, gcc at gcc dot gnu dot org
- References: <3AB95419.E6FD6F90@sympatico.ca> <3AB9C560.1C036F99@codesourcery.com>
- Reply-To: tim at hollebeek dot com
On Thu, Mar 22, 2001 at 09:26:56AM +0000, Nathan Sidwell wrote:
> >
> > bash$ g++ -c templ.cc
> > templ.cc:7: default argument for template parameter in function template `void
> > Bar::foo(T)'
> [14.1/9] A default template argmenent shall not be specified in a finction
> template ...
>
> not a bug
However the error message could be improved. The current one is a
sentence fragment stating a fact, which isn't particularly helpful.
I suggest:
templ.cc:7: Illegal definition of 'void Bar::foo(T)': Default template
arguments may not be used with function templates.