title: Designated initializer different behavior before and after c++20
body: <p>I came across this strange behavior and I can't find a good explanation of it.</p>
  
  <p>The code below will compile successfully <em>before c++20</em> and only fail if <code>explicit</code> is used.</p>
  
  <pre class="lang-cpp prettyprint-override"><code>struct Square {
    int area = 10;
  
    Square() = default; // only if this is explicit will the compile fail
    Square(const Square&amp; other) = delete;
    Square(Square&amp;&amp; other) = delete;
    Square&amp; operator =(Square&amp;&amp; square) = delete;
    Square&amp; operator =(const Square&amp; square) = delete;
  };
  
  int main() {
    Square s = {
        .area = 10
    };
  }
  </code></pre>
  
  <p>Which is strange on its own but turning the compiler to c++20 will make the above code fail with these error messages</p>
  
  <p>gcc</p>
  
  <blockquote>
    <p>could not convert brace-enclosed initializer list</p>
  </blockquote>
  
  <p>clang</p>
  
  <blockquote>
    <p>no matching constructor for initialization of 'Square'</p>
  </blockquote>
  
  <hr>
  
  <p><strong>Question</strong>:</p>
  
  <ul>
  <li><p>Why does it compile successfully before c++20 unless <code>explicit</code>? In other words what implicit conversion takes place to make that happen?</p></li>
  <li><p>What changed in c++20 that made this code fail to compile?</p></li>
  </ul>