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_STATIC_INVARIANT

BOOST_CONTRACT_STATIC_INVARIANT — Program static class invariants that can be completely disabled at compile-time.

Synopsis

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

BOOST_CONTRACT_STATIC_INVARIANT(...)

Description

BOOST_CONTRACT_STATIC_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
    static void BOOST_CONTRACT_STATIC_INVARIANT_FUNC() {
        ...
    }
#endif

Where:

See Also:

Disable Contract Compilation, Class Invariants


PrevUpHomeNext