This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 115e. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.
2024-11-11
Should it be allowed to use an object of a class type having a single conversion function to an integral type as an array size in the first bound of the type in an array new?
struct A { operator int(); } a; int main () { new int[a]; }
There are similar accommodations for the expression in a delete (7.6.2.9 [expr.delete] paragraph 1) and in a switch (8.5.3 [stmt.switch] paragraph 2) . There is also widespread existing practice on this (g++, EDG, MSVC++, and Sun accept it, and even cfront 3.0.2).
Rationale (October, 2004):
Duplicate of issue 299.