| Home | Libraries | People | FAQ | More

## Function make_old

boost::contract::make_old — Make an old value pointer (for virtual public functions and public functions overrides).

## Synopsis

    // In header: <boost/contract/old.hpp>

    old_pointer make_old(virtual_ * v, old_value const & old);

## Description

The related old value pointer will not be null if the specified old value was actually copied. This function is usually only called by code expanded by `BOOST_CONTRACT_OLDOF(v, old_expr)` as in:

    boost::contract::make_old(v, boost::contract::copy_old(v) ? old_expr :
            boost::contract::null_old())

See Also:

No Macros

Parameters:

`old` | Old value which is usually implicitly constructed from the user old value expression to be copied (use the ternary operator `?:` to completely avoid to evaluate the old value expression when `boost::contract::copy_old(v)` is `false`).
`v` | The trailing parameter of type ``boost::contract::virtual_```*` and default value `0` from the enclosing virtual or overriding public function declaring the contract.

Returns: | Old value pointer (usually implicitly converted to either `boost::contract::old_ptr` or `boost::contract::old_ptr_if_copyable` in user code).