g ++ accepts the code:
char b[static_cast<int&&>(5)];
N3936 [expr.const] / 3 defines the term as:
An integral constant expression is an expression of an integral or non-enumerated type of enumeration implicitly converted to prvalue, where the converted expression is an expression of a constant constant. [Note: such expressions can be used as array boundaries [...]
I'm not sure, because the expression looks like a type int&&, but the definition of an integral type in 3.9 does not mention reference types.
If unclear, my question is: is there an static_cast<int&&>(5)integral constant expression?
Background: The question is motivated by the following example:
char *c = (1 - 1);
char *d = static_cast<int&&>(0);
g++ -std=c++11 c, d. ++ 11 , 0. ( ++ 14).
clang (3.4.1 ) c -std=c++11.
, , g++ , , b d.