Boost C++ Libraries 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 a snapshot of the master branch, built from commit c0bc0d89c9.


BOOST_CONTRACT_PRECONDITIONS_DISABLE_NO_ASSERTION — Define this macro to not disable other assertions while checking preconditions (undefined by default).


// In header: <boost/contract/core/config.hpp>



Not disabling other assertions while checking preconditions can lead to infinite recursion in user code so by default this macro is not defined.

However, the [N1962] proposal does not disable assertions while checking preconditions because arguments can reach the function body unchecked if assertions are disabled while checking preconditions (e.g., when these same functions bodies are called to check the preconditions in question). This macro can be defined to obtain the behaviour specified in [N1962] (at the risk of infinite recursion).

See Also:

Feature Summary