Creating weak symbols with D
noone at nowhere.com
Sat Aug 8 18:39:53 UTC 2020
On Saturday, 8 August 2020 at 18:14:34 UTC, Stefan Koch wrote:
> On Saturday, 8 August 2020 at 17:59:08 UTC, Andrei Alexandrescu
>> Weak symbols (https://en.wikipedia.org/wiki/Weak_symbol) are
>> not often needed, but they are, they're needed badly.
>> C and C++ define __attribute__((weak)) to introduce weak
>> symbols. It would be great if D could have a corresponding
>> @weak attribute.
LDC has @weak, even working for MSVC targets since v1.22.
> Out of interested where do you find yourself needing to specify
> weak linkage?
More information about the Digitalmars-d