title: Why is "subclass copy constructor calling virtual inherited parent trivial constructor" not recommended
body: <p>I have a class that virtually inherits from a base class that only has a trivial constructor, but the copy constructor is explicitly deleted. Now I need to provide a copy constructor for this subclass and call the trivial constructor of the base class, like this:</p>
  <pre><code>class A {
  protected:
      explicit A () {}
      A (A const&amp;) = delete;
      virtual ~A () {}
  };
  class B : virtual public A {
  protected:
      explicit B () {}
      B (B const&amp;): A () {} 
      virtual ~B () {}
  };
  class C : public B {
  public:
      explicit C () noexcept {}
      C (C const&amp;) noexcept
        try: B () {} catch (...) { }
      ~C () noexcept {}
  };
  int main () {
      C c1;
      C c2{c1};
      return 0;
  }
  </code></pre>
  <p>There is no warning when I compile with godbolt.org ( <a href="https://godbolt.org/z/q6eWTj7vP" rel="nofollow noreferrer">https://godbolt.org/z/q6eWTj7vP</a> ). Under &quot;Dev C++ 5.11, TDM-GCC 4.9.2 64-bit Release&quot;, if I only use the compilation option <code>-std=c++11</code>  to compile, there will be no error. However, after the compilation option <code>-Wextra</code> is added, a warning is generated (in class C):</p>
  <pre><code>17  5   C:\Users\test.cpp   [Warning] base class 'class A' should be explicitly initialized in the copy constructor [-Wextra]
  </code></pre>
  <p>When I delete the keyword 'virtual' in <code>class B : public virtual A {</code>  in the above code, the warning disappears.</p>
  <p>I can't ignore any warning message, so I wonder why this warning message is generated. Thanks.</p>