Mail Archives: djgpp/1996/05/06/15:06:33
Xref: | news2.mv.net comp.os.msdos.djgpp:3508
|
From: | keanhin AT po DOT jaring DOT my (Choo Kean Hin)
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | V2-internal compiler error (code snippet)
|
Date: | Mon, 06 May 1996 12:01:30 GMT
|
Organization: | Unconfigured
|
Lines: | 28
|
Message-ID: | <4mktkc$lr8@jaring.my>
|
NNTP-Posting-Host: | j7.glg6.jaring.my
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
Tried compiling the code below using www.delorie.com's "Public
Compiler Service" and got an internal error. Same thing happens
on my setup (Win95/8MbRAM/DJGPP 2-gcc 2.7.2). Is there a
workaround I'm not aware of?
TseHuong Choo.
__________________________________________________
#include <stdio.h>
template <class T,class U, unsigned int (*HFUNC)(const T&)>
class A {
public:
T t;
U u;
A(const T& t1, const U& u1 ) : t(t1), u(u1) {}
unsigned int h() const { return (*HFUNC)(t); }
};
unsigned int doit( const char& c ) { return c; }
int main(int argc, char **argv)
{
typedef A<char,int,doit> Atype;
Atype a('c',1);
return 0;
}
- Raw text -