[Development] PSA: symbol visibility and export macros need to be re-thought for clang/libc++

Thiago Macieira thiago.macieira at intel.com
Fri Apr 4 22:16:46 CEST 2025


On Friday, 4 April 2025 13:07:12 Pacific Daylight Time Milian Wolff wrote:
> Agreed to all of this. But for me at least, the impact of visibility on non-
> polymorphic types, which you don't use dynamic cast nor throw as
> exceptions, was, so far, not clear at all. And this is the "new" part. Also
> note again the clear rule that I also learned from Marc that one should not
> wholesale export all-inline types, which goes against this 🙁

We can also argue this issue is QoI for std::any for the implementations at 
hand. The Standard requires an API to get the typeinfo, but it does not 
require *using* it as the discriminator. Implementations that support shared 
libraries and DLLs should be fixed to compare type names like QMetaType does.

I mean, we do have 20 years of experience with this, since Qt 4.0.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Principal Engineer - Intel DCAI Platform & System Engineering
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5150 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/development/attachments/20250404/e4bbc82b/attachment.bin>


More information about the Development mailing list