Il 11/06/20 11:11, Edward Welbourne ha scritto:

That then leaves the question of whether we deprecate in Qt 6 or remove
these macros.  I shall leave Marc, who I understand as wanting the
latter option, to make the case for it, lest I misrepresent that case.

I fear the macros are going to be needed anyhow to support pre-C11 compilers.

Qt itself can stop using them in C++ code (switching over static_assert). And I'd say that C++ mode we can assume static_assert presence everywhere, although the compiler detection will still be needed for C.

Whether the macros should be documented or not: I keep asking, are they supposed to be public API? My answer is more towards a "no", but given we're keeping them around anyhow for C, I'd say to keep them working also for C++.

Maybe we can use some trick to raise a warning for C++ code, but the maintenance burden for the C++ version is going to be 0.

A data point: KDE has (only) ~30 hits of Q_STATIC_ASSERT.

My 2 c,
--
Giuseppe D'Angelo | giuseppe.dang...@kdab.com | Senior Software Engineer
KDAB (France) S.A.S., a KDAB Group company
Tel. France +33 (0)4 90 84 08 53, http://www.kdab.com
KDAB - The Qt, C++ and OpenGL Experts

Attachment: smime.p7s
Description: Firma crittografica S/MIME

_______________________________________________
Development mailing list
Development@qt-project.org
https://lists.qt-project.org/listinfo/development

Reply via email to