Opened 12 years ago

Closed 9 years ago

#5362 closed Bugs (fixed)

circular_buffer does not compile with BOOST_NO_EXCEPTIONS

Reported by: anonymous Owned by: viboes
Milestone: Boost 1.55.0 Component: circular_buffer
Version: Boost 1.46.0 Severity: Problem
Keywords: Cc:

Description

circular_buffer/base.hpp does both throw_exception(std::out_of_range("...")) and throw_exception(std::length_error("...")) but std::out_of_range and std::length_error are undefined if stdexcept is not included.

the fix is to remove the conditional and always include stdexcept (as array.hpp and others already do):

#if !defined(BOOST_NO_EXCEPTIONS)

#include <stdexcept>

#endif

This issue is in all versions of boost that include circular_buffer

Change History (5)

comment:1 by anonymous, 12 years ago

workaround is to manually include stdexcept every time circular_buffer.hpp is included:

#include <stdexcept> // included for circular_buffer.hpp: https://svn.boost.org/trac/boost/ticket/5362
#include <boost/circular_buffer.hpp>
Last edited 9 years ago by viboes (previous) (diff)

comment:2 by viboes, 9 years ago

Owner: changed from Jan Gaspar to viboes
Status: newassigned

comment:3 by viboes, 9 years ago

Committed revision [84971].

comment:4 by viboes, 9 years ago

Milestone: To Be DeterminedBoost 1.55.0

comment:5 by viboes, 9 years ago

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.