How to specify an exact template?

Tove tove at fransson.se
Sat Jan 16 14:18:55 UTC 2021


On Saturday, 16 January 2021 at 14:14:57 UTC, solidstate1991 
wrote:
> On Saturday, 16 January 2021 at 14:13:29 UTC, solidstate1991 
> wrote:
>> Here's the following line, among many others:
>>
>> return &alphaBlend32bitMV!(ubyte);
>>
>> This generates an error, as this function template matches two 
>> instances, but currently I don't know how to choose the one I 
>> need, other than write a local function, that looks a bit ugly.
>
> Forgot to link the code example: 
> https://github.com/ZILtoid1991/pixelperfectengine/blob/master/pixeperfectengine/src/PixelPerfectEngine/graphics/layers/base.d#L143

probably you can use 
https://dlang.org/spec/traits.html#getOverloads



More information about the Digitalmars-d-learn mailing list