"SerGioGio" <sergiogiogio@yahoo.fr> wrote in message
news:be15mu$i0g$1@news-reader3.wanadoo.fr...[color=blue]
> Hello !
>
> When a ref. counted smart pointer (template) class is available (like
> boost::shared_ptr), is there any (semantic) reason to still use
> std::auto_ptr rather than this smart pointer ? Or should one use[/color]
shared_ptr[color=blue]
> for every cases ?
>
> Thanks in advance for your remarks !
>
> SerGioGio
>[/color]
If I had to upgrade software like this:
Fred *pfred = new Fred(...);
// use pfred here
delete pfred;
I would probably use std::auto_ptr. I don't use that style of programming
myself and so have little use for std::auto_ptr. I find the semantics of
this class so treacherous, particularly the part where the assignment
operation changes the objects on both sides (!), that I greatly prefer
boost::shared_ptr for general use.
--
Cycho{HHR}
http://home.rochester.rr.com/cyhome/