What's the correct opEquals signature for structs?
Andrej Mitrovic
andrej.mitrovich at gmail.com
Tue Mar 13 17:43:54 PDT 2012
On 3/14/12, Jonathan M Davis <jmdavisProg at gmx.com> wrote:
> As I understand it, auto ref is supposed to work with _any_ function. The
> _compiler_ decides whether it's best to use a ref or a value.
I never really understood the need for 'const ref' with structures. If
the compiler knows the size of a structure shouldn't it be able to
automatically figure out if it's faster to pass a struct by value or
by pointer? But maybe there's more to it than that?
More information about the Digitalmars-d-learn
mailing list