This is the mail archive of the gcc-prs@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: c++/6030: ...


The following reply was made to PR c++/6030; it has been noted by GNATS.

>From philippeb@videotron.ca  Mon Jan 13 01:09:28 2003
From: "Philippe A. Bouchard" <philippeb@videotron.ca>
To: neroden@twcny.rr.com, gcc-gnats@gcc.gnu.org, gcc-bugs@gcc.gnu.org,
 nobody@gcc.gnu.org
Cc:  
Subject: Re: c++/6030: ...
Date: Mon, 13 Jan 2003 00:11:40 -0500

 ----- Original Message -----
 From: "Nathanael Nerode" <neroden@twcny.rr.com>
 To: <philippeb@videotron.ca>; <gcc-gnats@gcc.gnu.org>;
 <gcc-bugs@gcc.gnu.org>; <nobody@gcc.gnu.org>
 Sent: Saturday, January 11, 2003 6:57 PM
 Subject: Re: c++/6030: ...
 
 
 > I'm a little confused by all this, but note that the following seems to
 work:
 > --
 
 [...]
 
 > int main()
 > {
 >         foo<int, 9>();
 >         foo<blah_fn, b>();
 > }
 
 [...]
 
 > int main()
 > {
 >         foo<int, 9>();
 >         foo<int (*) (void), b>();
 > }
 > --
 >
 > This seems like a sufficient workaround for most any purpose.  It also
 works
 > if you replace the * by &.
 >
 > And it leaves me wondering about the validity of the original. :-)
 
 Yes, you're right: non-type non-reference template parameters cannot be of
 function type (14.1.3 - .4).  But I would suggest clarifying the error
 report: "no matching function for call to foo()" with some "invalid non-type
 type".
 
 
 
 Thanks,
 
 Philippe A. Bouchard
 
 


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