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

19 lines
363 B
C++

// Test multiple pre 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()
.precondition([] {})
.precondition([] {}) // Error (multiple pre).
;
}
int main() {
f();
return 0;
}