<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/96638>96638</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Optimize `decltype(T){}` to `T` in compiler error messages
</td>
</tr>
<tr>
<th>Labels</th>
<td>
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
mpusz
</td>
</tr>
</table>
<pre>
In many cases clang generates an error like:
```
note: because 'implicitly_convertible(kind_of_<decltype(struct time{{{}}})>{{{}, {}}}, kind_of_<decltype(derived_quantity_spec<power<length, 2>, per<time> >{{{}, {{}}}})>{{{}}})' evaluated to false
```
besides the #88502 issue the `decltype(T){}` also does not help in readability here. The above message could be simplified to:
```
note: because 'implicitly_convertible(kind_of_<struct time>{}, kind_of_<derived_quantity_spec<power<length, 2>, per<time> >>{})' evaluated to false
```
Those two issues would help libraries like mp-units provide users with much easier-to-understand diagnostics.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJy0VEFv2zwM_TXyhUjgyEmcHHz4mjbAd9ol90CWGJurLHkinSD99YOddG2xbsAwDCBk-5nSo96jZJipCYiVWj2o1WNmBmljqrp-4Jesju5a_R-gM-EK1jAyWG9CAw0GTEaQwQTAlGICT8-oiv9U_qjy13Gd32P6DFHGDKjRmoERlC6p6z1ZEn892hjOmIRqj0pvnim4YzwdVbFzaL1c-xFlSYMVEOpQlQ-v8XgPvVXF0wdc7-Bjxg4-X9hhojO647fBBCG5HrlHq4pdHy-YVLHzGBppx_l65NA76Cd8qqR4gl8Rv-P-tMAfuC4Bz8YPRtCBRDgZz_ipirexRiaHDNKOOhabzSrXQMwD3qB1_m53h5HhRrjOwXiO4CIyhCjQou-BAiQ0ztTkSa7QYsI5HFoEU8czQofMpkGwcfAOagSefDvRVOs_Mf2903fNfrbv7z17W_rPLTi0kRHkEm-6M1wmeSZBPdXJJEKejgV0_WwIJAx9imdyCANjYriQtNANtgU0TJhmEmdDcJhYTHDgyDQhspDleeaqwm2LrcmwWpSLbaH1ptBZWxVLp_O6XOeLTVk6uzHbpXWIhVudTO7cMqNK53qZr_VqUSxzvZqf6q3TZWlxsahzh6Va5tgZ8nPvz908piab9lNt1-tik3lTo-fX2yFVY9KsHhpWy9wTC79NExKP1ZdeqKOX3_egxPH3YXylADZ2PXlM95vk3m6cDclXrUjPY4vpvdL7hqQd6rmNndL7kfj-mPUpfkUrSu9vZii9v9V_rvT3AAAA__8usIRT">