title: Why does the following compile if the non-POD constant isn't explicitly defined?
body: <p>I was under the impression that all <code>const</code> members had to be explicitly initialized by the constructor once, but after testing it seems as if only POD types have to be initialized. The following compiles regardless of whether <code>b</code> is mentioned in the constructor or not:</p>
  
  <pre><code>#include &lt;string&gt;
  
  struct A {
      const int a;
      const std::string b;
  
      A() : a{} {}
  };
  </code></pre>
  
  <p>Example: <a href="http://cpp.sh/36my2" rel="nofollow noreferrer">http://cpp.sh/36my2</a></p>