[Development] Move ctors for q_declare_shared types

Marc Mutz marc.mutz at kdab.com
Sat Jun 27 12:16:57 CEST 2015


On Friday 26 June 2015 19:23:58 Marc Mutz wrote:
> > Wyh can you do this inline?  
> >
> >  QFoo &operator=(QFoo &&other) { swap(other);QFoo<>().swap(other); return
> >
> > *this; } would not work ?
> 
> It would. But you would have made a previously fully inline function call
> a  non-inline one. You might as well copy, then (assuming we're still
> talking about implictly shared classes).

It also is no longer safe for self-assignment.

-- 
Marc Mutz <marc.mutz at kdab.com> | Senior Software Engineer
KDAB (Deutschland) GmbH & Co.KG, a KDAB Group Company
Tel: +49-30-521325470
KDAB - The Qt Experts



More information about the Development mailing list