Boost logo

Boost :

Subject: Re: [boost] [optional] generates unnessesary code for trivial types
From: Olaf van der Spek (ml_at_[hidden])
Date: 2012-02-15 03:40:09


On Wed, Feb 15, 2012 at 3:30 AM, Julien Nitard <julien.nitard_at_[hidden]> wrote:
>> An std container of references does not compile, a std container of pointers does.  In code with dynamic polymorphic type systems pointers get used a lot, and often more than they should.
>
> An std container of (boost/std)::(shared_ptr/unique_ptr) does compile
> and should be prefered to raw pointers.

Why?
If the pointers are non-owning, shared/unique is wrong.

-- 
Olaf

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