Opened 6 years ago

#12445 new Bugs

static_vector is not noexcept

Reported by: Domagoj Šarić Owned by: Ion Gaztañaga
Milestone: To Be Determined Component: container
Version: Boost 1.61.0 Severity: Optimization
Keywords: Cc:

Description

Resizing operations on static_vector completely delegate to the corresponding generic vector functionality which throws bad_alloc when the allocator returns null/runs out of storage. This is a bug which defeats the idea of static_vector as a lightweight wrapper around std::array, I don't want EH code generated for static_vectors. Just like array asserts on out-of-bounds access, so should static_vector (i.e. trying to resize a fixed capacity container beyond its capacity is a programming error).

Change History (0)

Note: See TracTickets for help on using tickets.