Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2003-07-22 06:56:51


Gregory Colvin <gregory.colvin_at_[hidden]> writes:

> I'm generally less afraid of automatic conversions than many others,
> and dropped them from auto_ptr, and later from shared_ptr, only under
> duress. I like them for wrapper classes because they make it possible
> to drop the wrappers directly into existing code that uses the wrapped
> types. I like the terseness too, but then I am perverse enough to
> prefer &*p to p.get().

Some conversions are worse than others. For example, an implicit
conversion from a raw pointer to an owning handle/smart-pointer is
far more dangerous than the opposite conversion.

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com

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