Boost logo

Boost :

From: Kevin Atkinson (kevinatk_at_[hidden])
Date: 2000-03-08 05:11:34


Kevin Atkinson wrote:

> template <typename T>
> void ClonePtr<T>::Parms::assign(T * & rhs, const T * lhs) const {
> if (typeid(*rhs) == typeid(*lhs)) {
> rhs->assign(lhs);
> } else {
> delete rhs;
add the line
        rhs = 0; // for exception safety incase clone throws

I thought I saved it before I attached it......

> rhs = lhs->clone();
> }
> }

-- 
Kevin Atkinson
kevinatk_at_[hidden]
http://metalab.unc.edu/kevina/

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk