mangling enum literals

Daveed Vandevoorde daveed at edg.com
Wed Apr 12 17:57:14 UTC 2000


Alex Samuel wrote:
> 
> The paragraph discussing literal template arguments doesn't mention
> enumeral values.  Do we use the value's <source-name>, or numerical
> representation in the underlying type?

I think you need to use the numerical value, because some valid enum
values may not have a name.  E.g., I believe that with:

	enum E { e1 = 1, e2 = 100 };

((E)3) is a valid constant-expression of type E.

(From memory; I didn't check the standard.)

	Daveed




More information about the cxx-abi-dev mailing list