mangling enum literals

Alex Samuel samuel at codesourcery.com
Wed Apr 12 17:59:26 UTC 2000


Daveed Vandevoorde <daveed at edg.com> writes:

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

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

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

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

Yes, I think that's right.  Could this be spelled out in the ABI
standard?




More information about the cxx-abi-dev mailing list