On Wednesday, 23 August 2023 06:39:32 PDT Marc Mutz via Development wrote:
> I cannot resist noting that the third item, in particular, is a problem
> for QOperatingSystemVersion, which, despite years of yours truly's
> hammering of that particular nail, is still exported as a
> non-polymorphic class in 6.0. I'm not sure we can prevent Windows from
> exporting such static constexpr nested variables (can we make them
> variable templates instead?).

There may be technical solutions for that particular problem.

The one that came to mind is to add the variables to 
QOperatingSystemVersionBase instead of QOperatingSystemVersion. That won't 
work because you can't declare a static constexpr variable of a class type 
inside that type because the type not being complete yet isn't yet a literal.

The solution to that, like most problems in computing, is yet another level of 
indirection. Proof of concept:
https://codereview.qt-project.org/c/qt/qtbase/+/498775

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Cloud Software Architect - Intel DCAI Cloud Engineering

Attachment: smime.p7s
Description: S/MIME cryptographic signature

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

Reply via email to