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 a snapshot of the master branch, built from commit c0bc0d89c9.
PrevUpHomeNext

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).


PrevUpHomeNext