title: Weird uninitialized const member behavior
body: <p>Consider this code snippet:</p>
  
  <pre><code>struct Foo {
  
  };
  
  template&lt;typename T&gt;
  struct Bar {
      const T foo;
  };
  
  int main() {
      Bar&lt;Foo&gt; test;
  }
  </code></pre>
  
  <p>I'm compiling it with g++-4.9.2 with [-std=c++11 -O0 -g3 -pedantic -Wall -Wextra -Wconversion] and getting <code>error: uninitialized const member in ‘struct Bar&lt;Foo&gt;’</code>. This is pretty obvious.</p>
  
  <p>BUT try just add std::string as Foo member and program compiles!</p>
  
  <pre><code>#include &lt;string&gt;
  struct Foo {
      std::string test;
  };
  // (...)
  </code></pre>
  
  <p>What happening? Replacing test's type into double causes program to fail to compile again. What string member changes in class?</p>
  
  <p><a href="http://gcc.godbolt.org/#%7B%22version%22%3A3%2C%22filterAsm%22%3A%7B%22labels%22%3Atrue%2C%22directives%22%3Atrue%2C%22commentOnly%22%3Atrue%7D%2C%22compilers%22%3A%5B%7B%22sourcez%22%3A%22MQSwdgxgNgrgJgUwAQB4DOAXATuA5gPgChDMsYIMkAxAexqQG9CBICGsTJTOALh9LxIMCTAG5CAX3GFhAWwAOUAIbCUGAJ7yEYJbOQAVIqXKUAQkqyMWbDpX1IAZnXFTi4SrKXgAFAEorzOZYKLQ0%2BEIiGC5AA%3D%3D%22%2C%22compiler%22%3A%22%2Fopt%2Fgcc-4.9.0%2Fbin%2Fg%2B%2B%22%2C%22options%22%3A%22-O2%20-std%3Dc%2B%2B11%22%7D%5D%7D" rel="nofollow noreferrer">Link to online compiler with this snippet.</a></p>
  
  <p>It seems that gcc behaves like that since version 4.6.</p>