Files
contract/test/set/post_pre-error.cpp
Lorenzo Caminiti c594323bef added .old(...)
2015-10-23 15:46:47 -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;
}