mirror of
https://github.com/boostorg/contract.git
synced 2026-02-27 17:02:15 +00:00
20 lines
403 B
C++
20 lines
403 B
C++
|
|
// Test multi post around 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([] {})
|
|
.precondition([] {})
|
|
.postcondition([] {}) // Error (multiple post around pre).
|
|
;
|
|
}
|
|
|
|
int main() {
|
|
f();
|
|
return 0;
|
|
}
|
|
|