Templates and Functions
Jarrett Billingsley
kb3ctd2 at yahoo.com
Wed Sep 12 05:39:43 PDT 2007
"Regan Heath" <regan at netmail.co.nz> wrote in message
news:fc8giq$12m$1 at digitalmars.com...
>
> T1 [] dMap( T1, T2:T2[] )( T1 function(T2) fp, T2[] array) {
>
> But that gives:
>
> template dbl.dMap(T1,T2 : T2[]) specialization not allowed for deduced
> parameter T2
>
> and I have no idea why specialization is not allowed :(
Specialization + IFTI = error, I'm not entirely sure why. But
specialization isn't needed here:
T1 [] dMap( T1, T2 )( T1 function(T2) fp, T2[] array) {
works fine. :)
More information about the Digitalmars-d-learn
mailing list