Thread overview
[Issue 15499] IFTI fails with function literal alias
Jan 02, 2016
Daniel
Jan 02, 2016
b2.temp@gmx.com
Mar 21, 2020
Basile-z
Dec 17, 2022
Iain Buclaw
Aug 26, 2023
Nick Treleaven
Nov 11
basile-z
January 02, 2016
https://issues.dlang.org/show_bug.cgi?id=15499

Daniel <wyrlon@gmx.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |rejects-valid

--
January 02, 2016
https://issues.dlang.org/show_bug.cgi?id=15499

b2.temp@gmx.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |b2.temp@gmx.com

--- Comment #1 from b2.temp@gmx.com ---
(In reply to Daniel from comment #0)
> alias add1(T1,T2) = (T1 a, T2 b)       => a+b;
> int   add2(T1,T2)   (T1 a, T2 b) { return a+b; }
> 
> void main()
> {
>   import std.stdio;
>   add1(1,1).writeln; // cannot deduce function from argument types !()(int,
> int)
>   add2(1,1).writeln; // OK
> }

It's maybe a dup of 1807.

I asked this a while ago on the forum (IFTI failed in partial template
specialization).

http://forum.dlang.org/post/yhzadvyxijdyyoreatey@forum.dlang.org

=>

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

--
March 21, 2020
https://issues.dlang.org/show_bug.cgi?id=15499

Basile-z <b2.temp@gmx.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|b2.temp@gmx.com             |

--
December 17, 2022
https://issues.dlang.org/show_bug.cgi?id=15499

Iain Buclaw <ibuclaw@gdcproject.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P1                          |P2

--
August 26, 2023
https://issues.dlang.org/show_bug.cgi?id=15499

Nick Treleaven <nick@geany.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |nick@geany.org

--- Comment #2 from Nick Treleaven <nick@geany.org> ---
> alias add1(T1,T2) = (T1 a, T2 b)       => a+b;
> int   add2(T1,T2)   (T1 a, T2 b) { return a+b; }

I think this should be changed to an enhancement, because add1 is a function literal template, whereas add2 is a function template. A function literal is a pointer, a function is not.

--
September 02
https://issues.dlang.org/show_bug.cgi?id=15499

Nick Treleaven <nick@geany.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|critical                    |enhancement

--
November 11
https://issues.dlang.org/show_bug.cgi?id=15499

basile-z <b2.temp@gmx.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           See Also|                            |https://issues.dlang.org/sh
                   |                            |ow_bug.cgi?id=18037

--