C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Extensible vtables -- Ensuring ABI isn't broken

From: Thiago Macieira <thiago_at_[hidden]>
Date: Sun, 18 Feb 2024 10:18:50 -0800
On Saturday, 17 February 2024 13:37:59 PST Tiago Freire via Std-Proposals
wrote:
> What you are trying to do works for reasons that got nothing to do with C++,
> it’s all UB that just happens to work in practice. C++ won’t be able to
> help you because it is technically an ODR violation.

Strictly speaking, it's IFNDR, not UB, but that's arguing semantics over what
may work in practice and how silently breakage can happen if you make
mistakes.

You're also right that the C++ standard can't touch this right now because it
doesn't know what a library is, much less a dynamically-linked one. But in my
opinion that's an excuse for not solving the problem: libraries and dynamic
linking have existed in mainstream for at least 30 years. The problems that
need solving are real. Solving them in C++ will not be a single massive update
to the standard and I actually doubt it will ever be contained completely
inside the standard, but it should start somewhere. And that implies the
standard should know about dynamic linking.

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel DCAI Cloud Engineering

Received on 2024-02-18 18:18:51