This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB 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: [PATCH v3] Introduce gdb::unique_ptr


On 10/14/2016 05:10 PM, Pedro Alves wrote:
> On 10/14/2016 05:07 PM, Simon Marchi wrote:
>> On 2016-10-14 08:50, Pedro Alves wrote:
>>> +struct unique_ptr_nullptr_t
>>> +{
>>> +private:
>>> +  struct private_type;
>>> +public:
>>> +  /* Since null_type is private, the only way to construct this class
>>
>> null_type, or private_type?
> 
> Whoops, yes, private_type.  Used to be called null_type, but then
> I renamed it thinking that it'd be clearer.

I've changed the comment locally to this:

struct unique_ptr_nullptr_t
{
private:
  struct private_type;
public:
  /* Since private_type is private, the only way to construct this
     class is by passing a NULL pointer.
     See unique_ptr_base::operator= (const unique_ptr_nullptr_t &).  */
  unique_ptr_nullptr_t (private_type *) {}
};

Thanks,
Pedro Alves


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