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 4eab8b4a 1/5: Follow the Rule of


From: Vadim Zeitlin
Subject: Re: [lmi] [lmi-commits] odd/rules_of_n 4eab8b4a 1/5: Follow the Rule of Zero
Date: Sun, 10 Jul 2022 14:08:02 +0200

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

GC> branch: odd/rules_of_n
GC> commit 4eab8b4a6c92398c9f3abd77e3940cbe9f8d2e78
GC> Author: Gregory W. Chicares <gchicares@sbcglobal.net>
GC> Commit: Gregory W. Chicares <gchicares@sbcglobal.net>
GC> 
GC>     Follow the Rule of Zero
GC>     
GC>     Identified by clang's '-Wdeprecated-copy-with-dtor'.
GC> ---
[...]
GC> diff --git a/test_coding_rules.cpp b/test_coding_rules.cpp
GC> index 7ec5afd5..21d0a6c7 100644
GC> --- a/test_coding_rules.cpp
GC> +++ b/test_coding_rules.cpp
GC> @@ -1169,9 +1169,6 @@ void enforce_taboos(file const& f)
GC>  class statistics
GC>  {
GC>    public:
GC> -    statistics() = default;
GC> -    ~statistics() = default;
GC> -
GC>      statistics& operator+=(statistics const&);
GC>  
GC>      static statistics analyze_file(file const&);

 I'd rather keep the explicitly defaulted default ctor, this shouldn't
result in any warnings and having it seems more clear to me.

VZ

Attachment: pgp_ElSCA88EF.pgp
Description: PGP signature


reply via email to

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