<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Hi,</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<div class="user-content-block">
<p>C++20 brings several new library features that would be great to use in the Qt API, foremost among them are coroutines and
<tt>std::span</tt>. <br>
</p>
<p><br>
</p>
<p>Yet, both of these are, in a sense, type-erasure techniques, and therefore most useful
<i>across</i> ABI boundaries.</p>
<p><br>
</p>
<p>Traditionally, Qt has defined a set of minimum supported C++ compilers and whatever their lowest common denominator was, that's what  could be used in the Qt ABI, everything else, let's call it conditionally-supported, could only be used in inline API.</p>
<p><br>
</p>
<p>It is worth noting that on MSVC, inline API in exported classes <i>already</i> forms part of the ABI, and no-one seems to have cared.</p>
<p><br>
</p>
<p>I would therefore like to propose to soften our ABI guidelines such that we can officially use said conditionally-supported types also in the ABI. This would allow to create non-inline APIs that use std::span and coroutines without having to wait for all
 compilers to support them.</p>
<p><br>
</p>
<p>This is not such a big step: We already have that, de facto, in MSVC. The only difference would be that a C++20 project would require a C++20(or later)-build of Qt. The error upon failure to comply would be unspectacular: linker not finding a symbol in the
 Qt library.</p>
<p><br>
</p>
<p>Seeing as we have allowed C++latest types in our ABI de-facto in the past, I think it's time to allow it de-jure, too.</p>
</div>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Discuss <span id="🙂" contenteditable="false">🙂</span><br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Thanks,</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Marc<br>
</div>
<div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div id="Signature">
<div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<table style="background:rgba(0,0,0,0) none repeat scroll 0% 0%; border:0px none; margin:0px; line-height:0">
<tbody>
<tr>
<td>
<table width="100%">
<tbody>
<tr>
<td style="height:14px"><span style="display:block; height:14px"></span></td>
</tr>
<tr>
<td><span style="display:block; border-bottom:2px solid rgb(181,183,191); height:0px"></span></td>
</tr>
<tr>
<td style="height:14px"><span style="display:block; height:14px"></span></td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td style="margin:0px; color:rgb(9,9,9); font-size:12px; line-height:18px; font-family:Arial,Helvetica,sans-serif; font-weight:normal">
<p style="margin:0px">Marc Mutz</p>
</td>
</tr>
<tr>
<td style="margin:0px; color:rgb(9,9,9); font-size:12px; line-height:18px; font-family:Arial,Helvetica,sans-serif; font-weight:normal">
<p style="margin:0px">Principal Software Engineer</p>
</td>
</tr>
<tr>
<td>
<table width="100%">
<tbody>
<tr>
<td style="height:7px"><span style="display:block; height:7px"></span></td>
</tr>
<tr>
<td style="height:7px"><span style="display:block; height:7px"></span></td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td style="margin:0px; color:rgb(9,9,9); font-size:12px; line-height:18px; font-family:Arial,Helvetica,sans-serif">
<p style="margin:0px"><span>The Qt Company</span><br>
<span>Erich-Thilo-Str. 10 12489</span><br>
<span>Berlin, Germany</span></p>
</td>
</tr>
<tr>
<td style="margin:0px; color:rgb(9,9,9); font-size:12px; line-height:18px; font-family:Arial,Helvetica,sans-serif; font-weight:normal">
<p style="margin:0px"><a href="mailto:marc.mutz@qt.io" style="text-decoration:underline">marc.mutz@qt.io</a></p>
</td>
</tr>
<tr>
<td style="margin:0px; color:rgb(9,9,9); font-size:12px; line-height:18px; font-family:Arial,Helvetica,sans-serif; font-weight:normal">
<p style="margin:0px"><a href="https://www.qt.io" style="text-decoration:underline">www.qt.io</a></p>
</td>
</tr>
<tr>
<td>
<table width="100%">
<tbody>
<tr>
<td style="height:7px"><span style="display:block; height:7px"></span></td>
</tr>
<tr>
<td style="height:7px"><span style="display:block; height:7px"></span></td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td style="margin:0px; color:rgb(9,9,9); font-size:12px; line-height:18px; font-family:Arial,Helvetica,sans-serif">
<p style="margin:0px">Geschäftsführer: Mika Pälsi, Juha Varelius, Jouni Lintunen</p>
<p style="margin:0px">Sitz der Gesellschaft: Berlin,</p>
<p style="margin:0px">Registergericht: Amtsgericht Charlottenburg,</p>
<p style="margin:0px">HRB 144331 B</p>
</td>
</tr>
<tr>
<td>
<table width="100%">
<tbody>
<tr>
<td style="height:15px"><span style="display:block; height:15px"></span></td>
</tr>
<tr>
<td><span style="display:block; border-bottom:2px solid rgb(181,183,191); height:0px"></span></td>
</tr>
<tr>
<td style="height:20px"><span style="display:block; height:20px"></span></td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td style="line-height:1"><a href="https://www.qt.io/" target="_blank"><img alt="https://s3.eu-north-1.amazonaws.com/email-signature-tool-leroy/qt-company.png" style="width:160px; height:56px" width="160" height="56" src="https://s3.eu-north-1.amazonaws.com/email-signature-tool-leroy/qt-company.png"></a></td>
</tr>
<tr>
<td style="padding:10px 0px 20px">
<table>
<tbody>
<tr>
<td style="padding:0px 3px 0px 0px"><a href="https://www.facebook.com/qt/" target="_blank"><span><img alt="https://s3.eu-north-1.amazonaws.com/email-signature-tool-leroy/facebook.png" style="width:35px; height:26px" width="35" height="26" src="https://s3.eu-north-1.amazonaws.com/email-signature-tool-leroy/facebook.png"></span></a></td>
<td style="padding:0px 3px 0px 0px"><a href="https://twitter.com/qtproject" target="_blank"><span><img alt="https://s3.eu-north-1.amazonaws.com/email-signature-tool-leroy/twitter.png" style="width:35px; height:26px" width="35" height="26" src="https://s3.eu-north-1.amazonaws.com/email-signature-tool-leroy/twitter.png"></span></a></td>
<td style="padding:0px 3px 0px 0px"><a href="https://www.linkedin.com/company/the-qt-company/" target="_blank"><span><img alt="https://s3.eu-north-1.amazonaws.com/email-signature-tool-leroy/linkedin.png" style="width:35px; height:26px" width="35" height="26" src="https://s3.eu-north-1.amazonaws.com/email-signature-tool-leroy/linkedin.png"></span></a></td>
<td style="padding:0px 3px 0px 0px"><a href="https://www.youtube.com/QtStudios" target="_blank"><span><img alt="https://s3.eu-north-1.amazonaws.com/email-signature-tool-leroy/youtube.png" style="width:35px; height:26px" width="35" height="26" src="https://s3.eu-north-1.amazonaws.com/email-signature-tool-leroy/youtube.png"></span></a></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<br>
</div>
</div>
</div>
</div>
</body>
</html>