Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!uunet!utoday!comeau From: comeau@utoday.UUCP (Greg Comeau) Newsgroups: comp.lang.c++ Subject: Re: For Lawyers, const (not really enums) Keywords: const, enum, zortech, c++ Message-ID: <1147@utoday.UUCP> Date: 11 Jan 90 17:28:54 GMT References: <969@rna.UUCP> Reply-To: comeau@.UUCP (Greg Comeau) Organization: UNIX Today!, Manhasset, NY Lines: 23 In article <969@rna.UUCP> kc@rna.UUCP (Kaare Christian) writes: >My real problem has to do with const, and how it seems to work >differently when applied to enum vs when applied to something >fundamental, like int. >I've become convinced that const enums in ztc are not quite right. >Comments, anyone? Yes, your last statement is correct. This is not a C++ 2.0 spec problem but an implementation problem. >Because of this, I am almost unable to use const >enum types, and that seems a shame, because it makes me either return >to #define, or actually store things in variables that needn't take up >a storage location. I think you're best off avoiding the alternatives (including your mention of bitfields in your previous message) above and just adding in the extra [agreed, verbose] casts so that you can get on with your work. -- Greg, Comeau Computing, 91-34 120th Street, Richmond Hill, NY, 11418 Producers of CC C++, SysAdm columnist for UNIX Today!, Microsoft Systems Journal (C programming), + others. Also, BIX c.language & c.plus.plus conf. moderator. Here:attmail!csanta!greg / BIX:comeau / CIS:72331, 3421 / voice:718-849-2355