Files
contract/test/set/post_post-error.cpp
2015-06-04 07:04:12 -07:00

19 lines
367 B
C++

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