Boost logo

Boost Users :

Subject: Re: [Boost-users] boost::none for boost::shared_ptr
From: Gavin Lambert (gavinl_at_[hidden])
Date: 2014-01-30 01:23:20


Mere moments ago, quoth I:
> On 30/01/2014 15:13, Quoth Ben Pope:
>>> // invoke g with empty object
>>> g(shared_ptr<CSomeReallyLongClassName>());
>>
>> g(0);
[...]
> (Also, the above doesn't compile in 1.53 because the raw pointer
> constructor is marked explicit. Again, maybe that's been changed in the
> interim.)

If you're using a C++11 compiler you should be able to use this though:

  g(nullptr);


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net