Can't use float array in map

bearophile bearophileHUGS at lycos.com
Fri Jun 3 10:29:28 PDT 2011


Andrej Mitrovic:

> A quick workaround would be:
>     static if (isFloatingPoint!(ElementType!R))
>     {
>         .ElementType!R x;
>         alias typeof(_fun(x)) ElementType;
>     }
>     else
>     {
>         alias typeof(_fun(.ElementType!R.init)) ElementType;
>     }

If you have improvements for Phobos code, then I suggest to write it in Bugzilla (or even create a pull request in git).

Bye,
bearophile


More information about the Digitalmars-d-learn mailing list