<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/58447>58447</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            clang++: Deduction guide is not automatically generated for templated aggregate class
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          ednolan
      </td>
    </tr>
</table>

<pre>
    Example code:

```
template <typename T>
struct Foo {
    T data;
};

// Enable this code to fix the compilation with Clang (modern) and GCC9 (ancient)
#if 0
template <typename T>
Foo(T) -> Foo<T>;
#endif

void foo() {
    int x = 0;
    Foo bar{ x };
}
```

Compiler explorer link: https://godbolt.org/z/qx64zz679
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyNUduSmzAM_RrzotkM2FzCAw_dXPoD-QGDBXFrbGrMbpKvr0w23bTTh2VsI0uydHRO69S1OVzkOBmEzilk4htL9yx9nGX6sdZrQEqUAYGJXbhOaOWIcGLicA_PwS9dgKNzwKrXuw_oO4GSQTLx4WLV_tO-n_xICw5WtoQjnPW8goHgoNcXckRw46Spt3YW3nU4w85IOwDj25EyvWW8BmkVfN_t6uiVttNoA7kfLYTu4Wtz0ABU4RRLvpAzDkSJa_wPbi7QKt0_T_HmtIJ-fRuf_kWBtgEu1G5PEMSTP3LVSk-5MfxMDNn_k-B-7lY20ANeJuM8GUbbnyQenEOY5qjiSungVOtM2Dg_0O1G-9elzG-3sqoTbLKyLLNM0E5UI1QtapkEHQw2XSSX8de4qOgeFQkbqR8WTbqQPtYFkEtwI0nSSWOuMKBFT6RGDjw8KFYgh8HjENmmqvOcLN40_6AkPZd2QxLTxZi3x-9l8u4HdiTiUc_zgjMZxTbPq-TcVLLKeLXtRdXylKu6yPJW5Fm9VUh-IRIjWzRzwwoaglt8h7UE2azYJ7qhRzxLs21W8TTLNnVbcNm3bS6xT1VXsDzFUWqziTgifYlvVkjtMswUNHoO82eQ5tKDRVzbUX1i5ux8g8o6YjJZWzcr9N_PNAUh">