Files
contract/test/set/function_set_post_pre_pre_error.cpp
2015-04-25 19:33:48 -07:00

16 lines
380 B
C++

#include <boost/contract/free_function.hpp>
// Test pre cannot be set twice (not even after post) for free functions
// (member functions use same setter objects, so no need to test those too).
int main() {
auto c = boost::contract::free_function()
.postcondition([&] {})
.precondition([&] {})
.precondition([&] {}) // Error.
;
return 0;
}