title: C++: explicit constructor is implicitly called by derived class
body: <p>Why making a constructor explicit does not prevent it to be implicitly called by derived class?</p>
  
  <pre><code>class A{
  public:
      explicit A(){}
  };
  
  class B : public A{
  public:
      B(){ //Constructor A() is called implicitly
  
          //...
      }
  }
  </code></pre>
  
  <p>I had a situation in my program when I'd rather have compiler error in that case, it would save me a lot of time to find a bug. For now I changed default constructor of A to accept a dummy "int" argument to achieve that, but shouldn't "explicit" keyword work for this?</p>
  
  <p>g++-4.8 compiles the code above without any errors or warnings.</p>