[Issue 12620] Compiler picks lesser template specialization match for float array alias value parameters

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Sun Jan 25 03:57:36 PST 2015


https://issues.dlang.org/show_bug.cgi?id=12620

Andrej Mitrovic <andrej.mitrovich at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |k.hara.pg at gmail.com

--- Comment #3 from Andrej Mitrovic <andrej.mitrovich at gmail.com> ---
(In reply to mfx from comment #2)
> Not a bug. You must use 1.0f (note the "f") if you want a float constant.
> 
>    alias foo3 = Foo!([1.0f]);

Ah, could be. I guess it makes sense to prefer matching the version which
retains the matching type (and retains the full range of the type this way)
rather than tries to implicitly convert it.

I'll CC Kenji on his opinions.

--


More information about the Digitalmars-d-bugs mailing list