Is CppCoreGuidelines C.21 correct? : <p>While reading the Bjarne Stroustrup's CoreCppGuidelines, I have found a guideline which contradicts my experience.</p>

<p>The <a href="https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#Rc-five">C.21</a> requires the following:</p>

<blockquote>
  <p>If you define or <code>=delete</code> any default operation, define or <code>=delete</code> them all</p>
</blockquote>

<p>With the following reason:</p>

<blockquote>
  <p>The semantics of the special functions are closely related, so if one needs to be non-default, the odds are that others need modification too.</p>
</blockquote>

<p>From my experience, the two most common situations of redefinition of default operations are the following:</p>

<p>#1: Definition of virtual destructor with default body to allow inheritance:</p>

<pre><code>class C1
{
...
    virtual ~C1() = default;
}
</code></pre>

<p>#2: Definition of default constructor making some initialization of RAII-typed members:</p>

<pre><code>class C2
{
public:
    int a; float b; std::string c; std::unique_ptr&lt;int&gt; x;

    C2() : a(0), b(1), c("2"), x(std::make_unique&lt;int&gt;(5))
    {}
}
</code></pre>

<p>All other situations were rare in my experience.</p>

<p>What do you think of these examples? Are they exceptions of the C.21 rule or it's better to define all default operations here? Are there any other frequent exceptions?</p>
