mirror of
https://github.com/boostorg/contract.git
synced 2026-02-09 11:02:34 +00:00
added .except(...), renamed old_ptr_noncopyable to old_ptr_if_copyable, and renamed OLDOF to OLD
This commit is contained in:
@@ -12,8 +12,8 @@
|
||||
|
||||
int inc(int& x) {
|
||||
int result;
|
||||
boost::contract::old_ptr<int> old_x = BOOST_CONTRACT_OLDOF(x);
|
||||
boost::contract::guard c = boost::contract::function()
|
||||
boost::contract::old_ptr<int> old_x = BOOST_CONTRACT_OLD(x);
|
||||
boost::contract::check c = boost::contract::function()
|
||||
.precondition([&] {
|
||||
BOOST_CONTRACT_ASSERT(x < std::numeric_limits<int>::max());
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user