Il 04/05/23 09:10, Marc Mutz via Development ha scritto:
With the same trick that C++20 did for std::memory_order?
That's an additional step we can take, but if clang-tidy has a
modernize-scope-enums (or we could write it), then it would be
preferable to just automatically port all users instead of writing code
that keeps unported code running. The main issue isn't the scoping, the
main issue will be the missing implicit conversion to underlying_type.

A few remarks:

* I think it's pretty optimistic to assume that people can/will use clang-based tooling on their codebases.

* This doesn't cope with an unspecified amount of other code -- thinking of .ui files, DBus XML interfaces, other serializations (QVariant?), etc. -- where the enumerators are currently written unscoped. We'd need a bunch of extra tools to fix all of that.

* Something doable in Qt 6 already: we need a QFlagsV2 that works across multiple enumerations (and that can use 8/16/32/64 bits, while at it), because we *still* have int-based APIs where one has to mix values from two or more enumerators.


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