mirror of
https://github.com/boostorg/contract.git
synced 2026-02-27 04:52:22 +00:00
15 lines
330 B
C++
15 lines
330 B
C++
|
|
#include <boost/contract/free_function.hpp>
|
|
|
|
// Test post cannot be set twice 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([&] {})
|
|
.postcondition([&] {}) // Error.
|
|
;
|
|
return 0;
|
|
}
|
|
|