meaning of "auto ref const"?

Picaud Vincent via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sun Dec 18 08:53:37 PST 2016


On Sunday, 18 December 2016 at 14:32:08 UTC, kinke wrote:

> TypeInfo_Struct apparently requires (or used to require) an 
> `int opCmp(ref const T rhs)` overload, i.e., a version taking 
> the rhs lvalue argument by reference (see 
> https://dlang.org/spec/operatoroverloading.html#compare). Note 
> that there are other overloads afterwards which take the rhs 
> argument by value, thereby allowing rhs rvalues too.

Thank you for your complementary answer and explanation. All 
these look less strange to me now.


More information about the Digitalmars-d-learn mailing list