Dynamic templated virtuals - I still often want them
Steven Schveighoffer
schveiguy at gmail.com
Wed Jul 29 12:17:55 UTC 2020
On 7/29/20 4:01 AM, Alexandru Ermicioi wrote:
> On Tuesday, 28 July 2020 at 21:09:51 UTC, Steven Schveighoffer wrote:
>>
>> So it doesn't matter where the code is stored, it is already concrete
>> and part of the vtable.
>>
>
> Well it does. How do you plan to handle the case where Y library is
> already compiled (separately, or available as .lib with .di interface)?
> Vtable should already be defined, which means that upon loading of lib,
> main app needs to patch vtable with missing template specializations.
>
This statement suggests you are not understanding the proposal. Arafel
is right -- it's not a template function to be instantiated on calling,
but a concrete function in the vtable instantiated on declaration.
I can't explain it better than Arafel did.
-Steve
More information about the Digitalmars-d
mailing list