title: cppcheck: member variable not initialized in the constructor
body: <p>The following code, as far as I can tell, correctly initializes the variables of the derived class <code>B</code>:</p>
  <pre><code>#include &lt;utility&gt;
  
  struct A {
    int i;
  };
  
  struct B : A {
    int j;
    explicit B(A&amp;&amp; a) : A(std::move(a)), j{i} { }
  };
  
  int main()
  {
    A a{3};
    B b(std::move(a));
  
    return 0;
  }
  </code></pre>
  <p>Running <a href="http://cppcheck.net/demo/" rel="nofollow noreferrer">cppcheck</a> with <code>--enable=all</code> gives the warning:</p>
  <blockquote>
  <p>[test.cpp:9]: (warning) Member variable 'A::i' is not initialized in
  the constructor. Maybe it should be initialized directly in the class
  A?</p>
  </blockquote>
  <p>Is there a reason for this (false, I think) warning?</p>