[Issue 15732] std.function partial does not work with function / delegate references
https://issues.dlang.org/show_bug.cgi?id=15732 Johannes Loher changed: What|Removed |Added Status|NEW |RESOLVED CC||johannes.lo...@fg4f.de Resolution|--- |FIXED --- Comment #4 from Johannes Loher --- It seems, this was not actually closed. Closing it now. --
[Issue 15732] std.function partial does not work with function / delegate references
https://issues.dlang.org/show_bug.cgi?id=15732 ZombineDev changed: What|Removed |Added CC||petar.p.ki...@gmail.com --- Comment #3 from ZombineDev --- 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 // 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.7 } I see no reason why the GitHub -> Bugzilla integration didn't close the issue automatically, so I'm closing it manually. --
[Issue 15732] std.function partial does not work with function / delegate references
https://issues.dlang.org/show_bug.cgi?id=15732 Marco de Wildchanged: What|Removed |Added CC||nanaya...@gmail.com Assignee|nob...@puremagic.com|nanaya...@gmail.com --
[Issue 15732] std.function partial does not work with function / delegate references
https://issues.dlang.org/show_bug.cgi?id=15732 Sebchanged: What|Removed |Added Keywords||bootcamp CC||greensunn...@gmail.com --
[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--- 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 // 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)); } --
[Issue 15732] std.function partial does not work with function / delegate references
https://issues.dlang.org/show_bug.cgi?id=15732 Ketmar Darkchanged: What|Removed |Added CC||ket...@ketmar.no-ip.org --
[Issue 15732] std.function partial does not work with function / delegate references
https://issues.dlang.org/show_bug.cgi?id=15732 Ketmar Darkchanged: What|Removed |Added Hardware|x86_64 |All OS|Linux |All Severity|enhancement |minor --
[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--- Created attachment 1588 --> https://issues.dlang.org/attachment.cgi?id=1588=edit Examle of "fixed" partial --