[C++0x] nullptr

Paolo Carlini paolo.carlini@oracle.com
Thu May 13 09:05:00 GMT 2010


Hi,
> On 3 May 2010 00:17, Magnus Fromreide wrote:
>   
>> (libstdc++-folks, there is a library patch in here that I would like to
>> get reviewed if possible)
>>     
> +      /**
> +       *  @brief  Construct an empty %shared_ptr.
> +       *  @param  __p  A null pointer constant.
> +       *  @post   use_count() == 1 && get() == nullptr
> +       */
>        template<typename _Tp1>
> +	shared_ptr(nullptr_t __p) : __shared_ptr<_Tp>() { }
>
> This should not be a template, and I think the comment and effects are
> wrong, it's not empty, since it owns the null pointer.  That means the
> base class should not be default constructed.
>   
Jonathan, now that the front-end changes are in and pretty solid after
the last patch from Jason, are you willing to tweak and apply the
library changes?

Thanks,
Paolo.



More information about the Libstdc++ mailing list