Created on 2012-09-21.00:00:00 last changed 131 months ago
[Moved to DR at the April, 2013 meeting.]
Proposed resolution (October, 2012):
This issue is resolved by the resolution of issue 1464.
According to 7.6.2.8 [expr.new] paragraph 7,
if the new-initializer is a braced-init-list for which the number of initializer-clauses exceeds the number of elements to initialize, no storage is obtained and the new-expression terminates by throwing an exception of a type that would match a handler (14.4 [except.handle]) of type std::bad_array_new_length (17.6.4.2 [new.badlength]).
This wording does not, but presumably should, require an exception to be thrown in a case like
void f() { int x = 3; new char[x]{"abc"}; }
(See also issue 1464.)
History | |||
---|---|---|---|
Date | User | Action | Args |
2014-03-03 00:00:00 | admin | set | status: drwp -> cd3 |
2013-10-14 00:00:00 | admin | set | status: dr -> drwp |
2013-05-03 00:00:00 | admin | set | messages: + msg4386 |
2013-05-03 00:00:00 | admin | set | status: ready -> dr |
2012-11-03 00:00:00 | admin | set | messages: + msg4050 |
2012-11-03 00:00:00 | admin | set | status: open -> ready |
2012-09-21 00:00:00 | admin | create |