no match
match with im­plicit con­ver­sions
match with con­ver­sion to const
exact match

Explain me, why this code prints:

Error: A() is not an lvalue

[code]
import std.stdio;

struct A { }

void foo(A a, float r) {
        
}

void foo(const A a, float r) {

}

void foo(ref A a, float r) {
        
}

void main()
{
   foo(A(), 12);
}
[/code]

Why is the ref A a functions chosen?
I create already a pull request but a explanation would be nice.

Reply via email to