Member function forwarding

Andrey Zherikov andrey.zherikov at gmail.com
Thu Feb 17 21:17:02 UTC 2022


On Thursday, 17 February 2022 at 20:59:43 UTC, Andrey Zherikov 
wrote:
> Another question: does `auto foo(ARGS...)(ARGS args) { return 
> a.foo(args); }` correctly forward `ref`, `const` etc. arguments?

Actually the answer is `NO`. I have to do `auto foo(ARGS...)(auto 
ref ARGS args) { return
a.foo(args); }`. Also if `a.foo` is a `const` function then I 
have to add `const` to this definition as well.


More information about the Digitalmars-d-learn mailing list