title: Why does this snippet using uniform initialization compile with g++4.6 but not g++4.7?
body: <p>Note that <em>derived</em> uses C++11 uniform initialization syntax to call the base class constructor.</p>
  
  <pre><code>class base
  {
      protected:
          base()
          {}
  };
  
  class derived : public base
  {
      public:
          derived()
              : base{} // &lt;-- Note the c++11 curly brace syntax
                       // using uniform initialization. Change the
                       // braces to () and it works.
          {}
  };
  
  int main()
  {
      derived d1;
  
      return 0;
  }
  </code></pre>
  
  <p>g++4.6 compiles this, however g++4.7 does not:</p>
  
  <pre><code>$ g++-4.7 -std=c++11 -Wall -Wextra -pedantic curly.cpp -o curly
  curly.cpp: In constructor ‘derived::derived()’:
  curly.cpp:4:13: error: ‘base::base()’ is protected
  curly.cpp:19:24: error: within this context
  </code></pre>
  
  <p>What's going on?</p>
  
  <p>Update 1: It also compiles without warnings with clang++-3.1<br>
  Update 2: <a href="http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54325" rel="noreferrer">Looks like a compiler bug for sure.</a> It's apparently fixed in GCC 4.7.3.</p>