Template matches more than one template declaration error when trying to pass function's pointer

solidstate1991 laszloszeremi at outlook.com
Sat Dec 1 01:17:55 UTC 2018


After some refactoring, there are four functions sharing the same 
name (technically four, but LDC didn't complain about them):

@nogc void blitter(T)(T* src, T* dest, size_t length){...}

and

@nogc void blitter(T)(T* src, T* dest, size_t length, T* 
mask){...}

I need the first one, but at compilation time I get the following 
error:

pixelperfectengine\src\PixelPerfectEngine\graphics\layers.d(61,30): Error: template CPUblit.composing.blitter matches more than one template declaration:
..\..\..\AppData\Local\dub\packages\cpublit-0.2.3\cpublit\src\CPUblit\composing.d(2006,19):     blitter(T)(T* src, T* dest, size_t length)
and
..\..\..\AppData\Local\dub\packages\cpublit-0.2.3\cpublit\src\CPUblit\composing.d(2274,19):     blitter(T)(T* src, T* dest, size_t length, T* mask)


More information about the Digitalmars-d-learn mailing list