Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of Boost. Click here to view this page for the latest version.
PrevUpHomeNext

Boost.Container and C++ exceptions

In some environments, such as game development or embedded systems, C++ exceptions are disabled or a customized error handling is needed. According to document N2271 EASTL -- Electronic Arts Standard Template Library exceptions can be disabled for several reasons:

In order to support environments without C++ exception support or environments with special error handling needs, Boost.Container changes error signalling behaviour when BOOST_CONTAINER_USER_DEFINED_THROW_CALLBACKS or BOOST_NO_EXCEPTIONS is defined. The former shall be defined by the user and the latter can be either defined by the user or implicitly defined by Boost.Confg when the compiler has been invoked with the appropriate flag (like -fno-exceptions in GCC).

When dealing with user-defined classes, (e.g. when constructing user-defined classes):

When the library needs to throw an exception (such as out_of_range when an incorrect index is used in vector::at)], the library calls a throw callback declared in <boost/container/throw_exception.hpp>:


PrevUpHomeNext