Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!cs.utexas.edu!sdd.hp.com!uakari.primate.wisc.edu!unmvax!bbx!tantalum!pete From: pete@edsr.eds.com (Pete Humphrey) Newsgroups: comp.lang.c++ Subject: TC++ bug? Keywords: TC++ generic Message-ID: <1990Aug2.131746@edsr.eds.com> Date: 1 Aug 90 16:47:46 GMT Sender: usenet@tantalum.UUCP Reply-To: pete@edsr.eds.com Organization: EDS Research Lines: 37 I recently tried to compile some of my code (which uses generic.h) with TC++. I was unable to get the code to compile, and I suspect a bug in the compiler. The following code segment (taken pretty much right out of Stroustrup) generates a compile error in Turbo C++. It works fine in GNU C++ and Zortech C++. Is there a bug in the Turbo C++ implementation of generic.h? ----------- example ------------- #include #ifndef GENERICH #include #endif #define gslist(type) name2(type,gslist) #define gslist_iterator(type) name2(type,gslist_iterator) #define gslistdeclare(type) \ struct gslist(type) \ { \ type insert(type a) { return a; } \ type append(type a) { return a; } \ } ; declare(gslist,int); gslist(int) list; -- Pete Humphrey US Mail: pete@edsr.eds.com EDS Research (505) 345-1863 5951 Jefferson Street N.E. Albuquerque, New Mexico 87109-3432