Steven Schveighoffer <[email protected]> wrote:
The correct way is to use auto ref as the parameter:
struct vec4
{
...
vec4 Normalize(auto ref const(vec4) param) {...}
}
But AFAIK, this doesn't really work.
It doesn't, no. I'm not even sure it's scheduled for inclusion. Also, with bugzilla #4843, overloading ref/non-ref for structs don't work, so the only current solution is to not use ref. -- Simen
