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

Macro BOOST_CONTRACT_NO_ALL

BOOST_CONTRACT_NO_ALL — Automatically defined by this library when contracts are not checked at all.

Synopsis

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

BOOST_CONTRACT_NO_ALL

Description

This library will define this macro when users define all BOOST_CONTRACT_NO_INVARIANTS, BOOST_CONTRACT_NO_PRECONDITIONS, BOOST_CONTRACT_NO_POSTCONDITIONS, BOOST_CONTRACT_NO_EXCEPTS, and BOOST_CONTRACT_NO_CHECKS (this macro is not a configuration macro and this library will generate a compile-time error if users try to define it directly). For example, users can manually program #ifndef statements in their code using this macro to avoid including the boost/contract.hpp header all together:

#include <boost/contract/core/config.hpp>
#ifndef BOOST_CONTRACT_NO_ALL
    #include <boost/contract.hpp>
#endif

Or, use the boost/contract_macro.hpp header and related macros instead (because the boost/contract_macro.hpp header is already optimized to not include other headers from this library when contracts are not checked, but recommended only for applications where it is truly necessary to completely remove contract code compilation from production code).

See Also:

Disable Contract Compilation


PrevUpHomeNext