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_PERMISSIVE

BOOST_CONTRACT_PERMISSIVE — Disable some compile-time errors generated by this library (undefined by default).

Synopsis

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

BOOST_CONTRACT_PERMISSIVE

Description

Defining this macro disables a number of static checks and related compile-time errors generated by this library, for example:

  • The static invariant member BOOST_CONTRACT_STATIC_INVARIANT_FUNC function must be declared static.

  • Non-static invariant member functions BOOST_CONTRACT_INVARIANT_FUNC must be declared either const, const volatile, or volatile const.

  • Derived classes that program contracts for one or more public function overrides via boost::contract::public_function must also define the BOOST_CONTRACT_BASE_TYPES typedef.

In general, it is not recommended to define this macro because these compile-time checks can guard against misuses of this library.

See Also:

Class Invariants, Base Classes


PrevUpHomeNext