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

Function set_invariant_failure

boost::contract::set_invariant_failure — Set failure handler for class invariants (at both entry and exit).

Synopsis

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


from_failure_handler const  & 
set_invariant_failure(from_failure_handler const & f);

Description

This is provided for convenience and it is equivalent to call both boost::contract::set_entry_invariant_failure and boost::contract::set_exit_invariant_failure with the same functor parameter f.

Throws: This is declared noexcept (or throw() before C++11).

See Also:

Throw on Failure, Class Invariants, Volatile Public Functions

Parameters:

f

New failure handler functor to set for both entry and exit invariants.

Returns:

Same failure handler functor f passed as parameter (e.g., for concatenating function calls).


PrevUpHomeNext