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

PrevUpHomeNext

Class old_pointer

boost::contract::old_pointer — Convert old value copies into old value pointers.

Synopsis

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


class old_pointer {
public:

  // public member functions
  template<typename T> operator old_ptr_if_copyable< T >();
  template<typename T> operator old_ptr< T >();
};

Description

This class is usually only implicitly used by this library and it does not explicitly appear in user code (that is why this class does not have public constructors, etc.).

old_pointer public member functions

  1. template<typename T> operator old_ptr_if_copyable< T >();
    Convert this object to an actual old value pointer for which the old value type T might or not be copyable.

    For example, this is implicitly called when assigning or initializing old value pointers of type boost::contract::old_ptr_if_copyable.

    Template Parameters:

    T

    Type of the pointed old value. The old value pointer will always be null if this type is not copyable (see boost::contract::is_old_value_copyable), but this library will not generate a compile-time error.

  2. template<typename T> operator old_ptr< T >();
    Convert this object to an actual old value pointer for which the old value type T must be copyable.

    For example, this is implicitly called when assigning or initializing old value pointers of type boost::contract::old_ptr.

    Template Parameters:

    T

    Type of the pointed old value. This type must be copyable (see boost::contract::is_old_value_copyable), otherwise this library will generate a compile-time error when the old value pointer is dereferenced.


PrevUpHomeNext