mirror of
https://github.com/boostorg/contract.git
synced 2026-02-26 16:42:19 +00:00
16 lines
380 B
C++
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;
|
|
}
|
|
|