[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
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Apr 15 21:45:04 PDT 2014
https://issues.dlang.org/show_bug.cgi?id=8654
Kenji Hara <k.hara.pg at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |DUPLICATE
--- Comment #4 from Kenji Hara <k.hara.pg at 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 ***
--
More information about the Digitalmars-d-bugs
mailing list