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]

Re: member templates and default parameter


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.


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