This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Template fun.
- To: egcs-bugs at cygnus dot com
- Subject: Template fun.
- From: Karl Nelson <kenelson at ece dot ucdavis dot edu>
- Date: Thu, 25 Mar 1999 09:55:34 -0800 (PST)
- Cc: kenelson at teal dot ece dot ucdavis dot edu
This code is wrong but generates an internal compiler error.
template <class A>
struct Sig
{
typedef void (*Func)(A);
Func f_;
void call(A& a)
{f_(a);}
Sig(Func f):f_(f)
{}
template <class A>
struct Sig
{
typedef void (*Func)(A&);
Func f_;
void call(A a)
{f_(a);}
Sig(Func f):f_(f)
{}
};
--Karl