On Wednesday, 17 January 2024 19:35:17 PST Thiago Macieira wrote:
> Alternatives:
> * move to a class that is not exported
>    trick: add an empty base with the variable
> * change to enum (if primitive)

* change to an static (inline) constexpr function

Then there's always a copy, because GCC either inlines or emits a copy for 
functions.
https://mingw.godbolt.org/z/bh95q8PKf

MSVC sucks at inlining dllimported functions, but there's no problem because 
it exported on the other side.

-- 
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