> I can't disagree with your reading ("involve" doesn't mean "be").  However,
> searching for "integral constant expression" suggests to me that this
> outlaws the following code, all of which compiles without warning:
> 
> enum {dim = 1};
> char a [dim]; // 8.3.4.1

Please note that only null pointer constants are required to be "of
integer type". Not every "integral constant expression" is "of integer
type"; some are of enumeration type. An array bound doesn't need to be
of integer type.

> void* b = new char [1] [dim]; // 5.3.4.6

... nor does the dimension in a new expression ...

> struct Badger
> {
>   static const int i = dim; // 9.4.2.4

... nor the initialization of a static data member of const integral
*or const enumeration type* (notice that, under your interpretation,
it would be disallowed to initialize a const of enumeration type with
an enumerator - this is certainly not intended in C++).

Regards,
Martin


Reply via email to