Files
contract/test/set/function_set_pre_post_post_error.cpp
2015-04-25 19:33:48 -07:00

16 lines
380 B
C++

#include <boost/contract/free_function.hpp>
// Test post cannot be set twice (not even after pre) for free functions
// (member functions use same setter object, so no need to test those too).
int main() {
auto c = boost::contract::free_function()
.precondition([&] {})
.postcondition([&] {})
.postcondition([&] {}) // Error.
;
return 0;
}