On Wed, 2019-12-04 at 10:27 -0700, Tom Tromey wrote:
> > > > > > "Martin" == Martin Sebor <mse...@gmail.com> writes:
> > > + private:
> > > +  // Private to disallow copies.
> > > +  auto_client_timevar (const auto_client_timevar &);
> 
> Martin> I don't know why it's important to disallow making copies of
> Martin> these classes (they look safe to copy) but usually it goes
> Martin> along with assignment so I would suggest adding a comment
> Martin> with a rationale and (perhaps also) disabling assignment.
> 
> ansidecl.h has a DISABLE_COPY_AND_ASSIGN macro you can use here.
> gdb uses this quite a bit.
> 
> Tom

Thanks Martin and Tom; I'm currently adding DISABLE_COPY_AND_ASSIGN in
various places.

Dave

Reply via email to