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

19 lines
349 B
C++

// Test post before old 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 old).
.old([] {})
;
}
int main() {
f();
return 0;
}