April 16, 2014 [Issue 8654] cannot take address of function which is 1)overloaded, 2) templated, and 3) member (static or not): Error: xxx is not an lvalue | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=8654 Kenji Hara <k.hara.pg@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |DUPLICATE --- Comment #4 from Kenji Hara <k.hara.pg@gmail.com> --- (In reply to Kenji Hara from comment #2) > run(&a.fun3); should be ambiguous, because there's not enough context to determine overload resolution. Current state with 2.066 git-head is: void main() { auto a=new A; run(&a.fun1!2); // correctly accepted run(&a.fun2!2); // correctly accepted run(&a.fun3); // wrongly accepted -> dup of issue 1983 run(&a.fun4!2); // correctly accepted //run(&a.fun5!double); // correctly rejected // Error "matches more than one template declaration", expected run(&A.fun6!2); // correctly accepted run(&fun7!2); // correctly accepted } *** This issue has been marked as a duplicate of issue 1983 *** -- |
Copyright © 1999-2021 by the D Language Foundation