| Home | Libraries | People | FAQ | More

## Function make_old

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

## Synopsis

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

    old_pointer make_old(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(old_expr)` as in:

    boost::contract::make_old(boost::contract::copy_old() ? 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()` is `false`).

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