Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext

Macro BOOST_CONTRACT_INVARIANT

BOOST_CONTRACT_INVARIANT — Program (constant) class invariants that can be completely disabled at compile-time.

Synopsis

// In header: <boost/contract_macro.hpp>

BOOST_CONTRACT_INVARIANT(...)

Description

BOOST_CONTRACT_INVARIANT({ ... }) expands to code equivalent to the following (note that no code is generated when BOOST_CONTRACT_NO_INVARIANTS is defined):

#ifndef BOOST_CONTRACT_NO_INVARIANTS
    void BOOST_CONTRACT_INVARIANT_FUNC() const {
        ...
    }
#endif

Where:

See Also:

Disable Contract Compilation, Class Invariants


PrevUpHomeNext