[Development] [docs/c++] How do we deal with the special member functions (copy/move ctor/assignment operator, dtor, default ctor)

Knoll Lars Lars.Knoll at digia.com
Mon Aug 4 08:02:51 CEST 2014


On 02/08/14 18:21, "Thiago Macieira" <thiago.macieira at intel.com> wrote:

>On Friday 01 August 2014 23:16:40 Marc Mutz wrote:
>> That leaves the question how to deal with the documentation for these
>> implicit  members.
>
>Why do we have to document them in the first place? I hate having to
>write 
>documentation for a destructor that simply says "frees resources
>associated 
>with this object". That much is obvious: any self-respecting destructor
>will 
>do that and the same applies to copy and move constructors.
>
>What we really want is to document which objects are copyable and which
>ones 
>aren't. And that is very simple: any object with Q_DISABLE_COPY is not
>copyable, (almost) everything else is.

+1. I don’t see a reason to document implicitly generated methods. They
simply do what the C++ standard defines they should do.

Cheers,
Lars



More information about the Development mailing list