On 04/04/2025 17:44, Thiago Macieira wrote:
The conclusion from this is that, from the point of view of the C++ language, they*are* different types, even if they have the same mangling and can (and are) passed across library boundaries in by value, by pointer, in containers, etc. The big problem here is that the C++ standard does not recognise shared libraries & DLLs exist, so this is an area that is underdeveloped. Despite being the mainstream. IMNSHO, this needs to be addressed in the Standard, ahead of modules even.
I wouldn't hold my breath there. If we think that Clang's type_visibility attribute helps, we should instead ask GCC to implement the same, and start plastering our public APIs with it. At least this will give us some useful results in 2-3 years time, rather than 10-20.
(I'm still unsure about _how_ the attribute works, specifically how does it figure out the TU and thus the shared library in which to pin the RTTI information?)
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 - Trusted Software Excellence
smime.p7s
Description: S/MIME Cryptographic Signature
-- Development mailing list Development@qt-project.org https://lists.qt-project.org/listinfo/development