ref semantics with hashes
Andrej Mitrovic
andrej.mitrovich at gmail.com
Thu May 3 23:18:56 PDT 2012
On 5/3/12, Artur Skawina <art.08.09 at gmail.com> wrote:
> alias p1.p2.p3.p4.p5.p6.hash hash3;
> alias p1.p2?p1.p2.hash:p3.p4.hash hash4;
> alias getfoo().hash hash5;
I was under the impression that alias would only be used as a
compile-time alias to a nested symbol. So this:
alias p1.p2.p3.hash foo;
test(foo);
would be somewhat equivalent to:
alias p1.p2.p3.hash foo;
mixin("test(p1.p2.p3.hash);");
I never thought of using alias as some sort of pointer in disguise.
More information about the Digitalmars-d-learn
mailing list