Thread overview | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
February 27, 2016 [Issue 15732] std.function partial does not work with function / delegate references | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=15732 --- Comment #1 from mikey <abc.mikey@googlemail.com> --- Created attachment 1588 --> https://issues.dlang.org/attachment.cgi?id=1588&action=edit Examle of "fixed" partial -- |
February 27, 2016 [Issue 15732] std.function partial does not work with function / delegate references | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=15732 Ketmar Dark <ketmar@ketmar.no-ip.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ketmar@ketmar.no-ip.org -- |
February 27, 2016 [Issue 15732] std.function partial does not work with function / delegate references | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=15732 Ketmar Dark <ketmar@ketmar.no-ip.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Hardware|x86_64 |All OS|Linux |All Severity|enhancement |minor -- |
February 27, 2016 [Issue 15732] std.function partial does not work with function / delegate references | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=15732 --- Comment #2 from mikey <abc.mikey@googlemail.com> --- Example of error: auto partial_application () { // definition of a basic function on 3 parameters using lambda syntax auto basic = (float a, float b, float c) => a + b / c; // partially apply value to basic import std.functional : partial; alias partial!(basic, 1) apply1; return &apply1; // Error: partial(Ts...)(Ts args2) is not an lvalue } void main(string[] args) { auto test = partial_application(); import std.stdio : writeln; writeln("result: ", test(1, 2, 3)); } -- |
March 31, 2018 [Issue 15732] std.function partial does not work with function / delegate references | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=15732 Seb <greensunny12@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |bootcamp CC| |greensunny12@gmail.com -- |
May 05, 2018 [Issue 15732] std.function partial does not work with function / delegate references | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=15732 Marco de Wild <nanayamae@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nanayamae@gmail.com Assignee|nobody@puremagic.com |nanayamae@gmail.com -- |
August 24, 2018 [Issue 15732] std.function partial does not work with function / delegate references | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=15732 ZombineDev <petar.p.kirov@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |petar.p.kirov@gmail.com --- Comment #3 from ZombineDev <petar.p.kirov@gmail.com> --- Since the https://github.com/dlang/phobos/pull/6497 was merged, a fixed version of the example above compiles: auto partial_application () { // definition of a basic function on 3 parameters using lambda syntax auto basic = (float a, float b, float c) => a + b / c; // partially apply value to basic import std.functional : partial; alias partial!(basic, 1) apply1; return &apply1; // now OK, didn't compile before } void main(string[] args) { auto test = partial_application(); import std.stdio : writeln; writeln("result: ", test(2, 3)); // 1 + (2/3) = 1.66667 } I see no reason why the GitHub -> Bugzilla integration didn't close the issue automatically, so I'm closing it manually. -- |
August 26, 2018 [Issue 15732] std.function partial does not work with function / delegate references | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=15732 Johannes Loher <johannes.loher@fg4f.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |johannes.loher@fg4f.de Resolution|--- |FIXED --- Comment #4 from Johannes Loher <johannes.loher@fg4f.de> --- It seems, this was not actually closed. Closing it now. -- |
Copyright © 1999-2021 by the D Language Foundation