#1919 closed Bugs (fixed)
Default constructed circular buffer throws std::bad_alloc
Reported by: | Dean Michael Berris | Owned by: | Jan Gaspar |
---|---|---|---|
Milestone: | Component: | circular_buffer | |
Version: | Boost 1.35.0 | Severity: | Showstopper |
Keywords: | circular_buffer, bad_alloc | Cc: |
Description
When a circular buffer is default constructed, it causes an allocation that's very large causing usually a bad allocation error when using the standard allocator(s).
A proposed change is to make the default constructor instead set the capacity to 0.
Attachments (1)
Change History (3)
by , 14 years ago
Attachment: | boost-circular-buffer-default-constructor-patch.diff added |
---|
comment:1 by , 14 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
Patch to set the default size when default constructed to 0.