BOOST_CONTRACT_OLDOF — Macro typically used to copy an old value expression and assign it to an old value pointer.
// In header: <boost/contract/old.hpp> BOOST_CONTRACT_OLDOF(...)
The expression expanded by this macro should be assigned to an old value pointer of type
boost::contract::old_ptr_if_copyable. This is an overloaded variadic macro and it can be used in the following different ways.
From within virtual public functions and public functions overrides:
From all other operations:
v is the extra parameter of type
* and default value
0 from the enclosing virtual public function or public function overrides declaring the contract.
old_expr is the expression to be evaluated and copied to the old value pointer. (This is not a variadic macro parameter so any comma it might contain must be protected by round parenthesis,
BOOST_CONTRACT_OLDOF(v, (old_expr)) will always work.)
On compilers that do not support variadic macros, programmers can manually copy old value expressions without using this macro (see No Macros).