Home | Libraries | People | FAQ | More |
boost::contract::specify_postcondition_except — Allow to specify postconditions or exception guarantees.
// In header: <boost/contract/core/specify.hpp> template<typename VirtualResult = void> class specify_postcondition_except { public: // construct/copy/destruct ~specify_postcondition_except(); // public member functions template<typename F> specify_except postcondition(F const &); template<typename F> specify_nothing except(F const &); };
Allow to specify functors this library will call to check postconditions or exception guarantees. This object is internally constructed by the library when users specify contracts calling boost::contract::function
and similar functions (that is why this class does not have a public constructor).
See Also:
Postconditions, Exception Guarantees
typename VirtualResult = void
Return type of the enclosing function declaring the contract if that is either a virtual or an overriding public function, otherwise this is always void
. (Usually this template parameter is automatically deduced by C++ and it does not need to be explicitly specified by programmers.)
specify_postcondition_except
public
construct/copy/destruct~specify_postcondition_except();Destruct this object.
Throws: This is declared noexcept(false)
since C++11 to allow users to program failure handlers that throw exceptions on contract assertion failures (not the default, see
Throw on Failure).
specify_postcondition_except
public member functionstemplate<typename F> specify_except postcondition(F const & f);Allow to specify postconditions.
Parameters: |
|
||
Returns: |
After postconditions have been specified, the object returned by this function allows to optionally specify exception guarantees. |
template<typename F> specify_nothing except(F const & f);Allow to specify exception guarantees.
Parameters: |
|
||
Returns: |
After exception guarantees have been specified, the object returned by this function does not allow to specify any additional contract. |