<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/120558>120558</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
External symbol linker errors with std::shared_ptr in lambda
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
kamrann
</td>
</tr>
</table>
<pre>
The linked reproduction has had a lot of code removed so is somewhat nonsensical, but produces linker errors with clang (19 & trunk) whilst compiling successfully with gcc and MSVC. Similar errors result across both Windows (with MS STL) and Linux (both libc++ and libstdc++), seemingly relating to symbols of virtual functions initially declared pure.
https://godbolt.org/z/oK1dhPMhh
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJxskkFv2zgQhX8NdRnEECnLsQ46ONn1ZRNgAQftsaDIkchmRBoc0o776wspRgsUPQnQcN6b9-FpZj8FxF60T6L9p9Ilu5j6dz0nHUI1RHvr3xwC-fCOFhKeU7TFZB8DOM3gtAUNFDPEEUy0CAnneEELHMEzcJzx6nSGEANjYG80CfUMQ8nwKYX8KZ4AU4qJ4eqzA0M6TCDUXnYg1A5yKuFdqA6uzhNnMHE-e_JhAi7GIPNYiG6fu5MxoIOF19OX5w2c_OxJ_1JPyIUyaJMiMwwxO_jqg41XXtzW_dcTnN5eFrNF5cWH8rHM1rfkByPUk1BP65D8wNne_wjVLdEYcfZhohskJJ2XG3MEvs1DJF4wXXzKRROMJawgGXzw2eslgEVDOqGFc0m4EfVB1AeX85lFcxDqKNRxinaIlDcxTUIdfwh1jP9J6_5_dU7Uh8r2je2aTlfYy8dmu6v39U5WrscO1WBaOXS4a_ajRDPottNGYjvKtpGV71WttlLJTspmq-Rma_ejVo-PEuWo1YhiW-OsPW2ILvNiX3nmgr1UddvuK9IDEq89UirgFdapUGqpVeqXpYehTCy2NXnO_Fsm-0zY__uRMQVNd1J_KwVnu2BoDuwWRt_OOYEPQHoerK5Kov4PVD67MmxMnIU6Lnb3z8M5xe9oslDH9UgW6nhPcenVzwAAAP__z7kI9A">