Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2003-02-21 10:58:45


Fernando Cacciola (Home) wrote:
[...]
> One is initialization from a null pointer value, as in:
>
> struct C
> {
> C() : ptr(0) {}
>
> shared_ptr<X> ptr ;
> } ;
>
> this one is very useful because its very idiomatic.

Use

   C() : ptr() {}

instead; it is supposed to work for any pointer.


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