lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lmi] [lmi-commits] odd/rules_of_n eb5fef08 4/5: Follow the Rule of


From: Vadim Zeitlin
Subject: Re: [lmi] [lmi-commits] odd/rules_of_n eb5fef08 4/5: Follow the Rule of Five
Date: Sun, 10 Jul 2022 14:11:21 +0200

On Sat,  9 Jul 2022 18:31:24 -0400 (EDT) Greg Chicares 
<gchicares@sbcglobal.net> wrote:

GC> branch: odd/rules_of_n
GC> commit eb5fef08943a13ca5cd5b4e670b7e898467c5533
GC> Author: Gregory W. Chicares <gchicares@sbcglobal.net>
GC> Commit: Gregory W. Chicares <gchicares@sbcglobal.net>
GC> 
GC>     Follow the Rule of Five
GC>     
GC>     Identified by clang's '-Wdeprecated-copy-with-dtor'.
GC>     
GC>     For concinnity, written thus:
GC>      - all ctors
GC>      - blank line
GC>      - the other five special members, in a consistent order
GC>      - blank line

 I think it would be more clear if the first line of the paragraph above
said "All ctors except for the copy and move ctors".

GC>     All added special members are defaulted, except that they're deleted
GC>     for class any_entity. Perhaps they should all be deleted, initially at
GC>     least, and defaulted only if they're used.

 This is definitely a good idea in general, but I'm pretty sure at least
some of the copy ctors are actually used and there would be a lot of
compilation errors if you deleted them.

VZ

Attachment: pgpD37IByoYeb.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]