Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!ll-xn!cit-vax!oddhack!jon From: jon@oddhack.Caltech.Edu (Jon Leech) Newsgroups: comp.lang.c++ Subject: Constant expressions Message-ID: <1252@cit-vax.Caltech.Edu> Date: Sun, 30-Nov-86 04:19:03 EST Article-I.D.: cit-vax.1252 Posted: Sun Nov 30 04:19:03 1986 Date-Received: Sun, 30-Nov-86 19:41:01 EST Sender: news@cit-vax.Caltech.Edu Reply-To: jon@cit-vax.UUCP (Jon Leech) Organization: California Institute of Technology Lines: 15 I recently found that C++ (1.1) does not allow integral casts in constant expressions in some cases; for example, const int i = (unsigned)1; // Is legal typedef enum { one = (unsigned)1 } ENUM; // Is not. Unfortunately, this makes it impossible to include some of the graphics header files on Suns which use the latter form (it also happens to disagree with the ANSI C draft, sadly). Has anyone got a fix for this problem? -- Jon Leech (jon@csvax.caltech.edu || ...seismo!cit-vax!jon) Caltech Computer Science Graphics Group __@/