Destructors, const structs, and opEquals

spir denis.spir at gmail.com
Sun Dec 5 01:27:00 PST 2010


On Sat, 04 Dec 2010 23:36:22 -0500
"Steven Schveighoffer" <schveiguy at yahoo.com> wrote:

> No no no, inout does not belong here.  Use const.  inout is only used if  
> you are returning a portion of the arguments.  That should be a hard rule  
> by the compiler (error).
> 
> Fixed:
> 
> bool opEquals(auto ref const(Tuple) rhs) const

Why isn't the parameter simply "in" instead of "auto ref const"? (And let the compiler decide whther it's worth passing it as ref for efficiency).

Denis
-- -- -- -- -- -- --
vit esse estrany ☣

spir.wikidot.com



More information about the Digitalmars-d mailing list