This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [C++0x] nullptr


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]