Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of boost. Click here for the latest Boost documentation.
PrevUpHomeNext

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 often only used by code expanded by BOOST_CONTRACT_OLDOF(v, old_expr):

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 avoid evaluating the old value expression all together 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).


PrevUpHomeNext