- Title
- Which exception to throw for overflow in array size calculation
- Status
- cd2
- Section
- 7.6.2.8 [expr.new]
- Submitter
- UK
Created on 2009-03-03.00:00:00 last changed 199 months ago
Messages
Date: 2009-07-15.00:00:00
[Voted into WP at July, 2009 meeting as part of N2932.]
Date: 2009-03-15.00:00:00
Notes from the March, 2009 meeting: The CWG was in favor of throwing an exception derived from
std::bad_alloc . This would be upwardly compatible; it
would be harmless for programs that currently catch
std::bad_alloc , but would allow programs to treat the
calculation overflow case separately if they wish.
Date: 2026-07-25.21:52:10
N2800 comment
UK 72 Throwing std::length_error (7.6.2.8 [expr.new] paragraph 7)
for an attempt to allocate a too-large array brings in
too much of the Standard library. A simpler exception, like
std::bad_alloc , should be thrown instead.
N2800 comment
UK 192
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2010-03-29 00:00:00 | admin | set | status: wp -> cd2 |
| 2009-11-08 00:00:00 | admin | set | status: dr -> wp |
| 2009-08-03 00:00:00 | admin | set | messages: + msg2253 |
| 2009-08-03 00:00:00 | admin | set | status: open -> dr |
| 2009-03-23 00:00:00 | admin | set | messages: + msg1983 |
| 2009-03-03 00:00:00 | admin | create | |