Files
contract/test/set/post_pre_error.cpp
2015-10-29 19:51:05 -07:00

19 lines
358 B
C++

// Test post before pre error (for free func, but same for all contracts).
#include <boost/contract/function.hpp>
#include <boost/contract/guard.hpp>
void f() {
boost::contract::guard c = boost::contract::function()
.postcondition([] {}) // Error (post before pre).
.precondition([] {})
;
}
int main() {
f();
return 0;
}