implicite deref on array element access? (indexing)

spir denis.spir at gmail.com
Fri Feb 25 07:15:52 PST 2011


Hello,

I thought it worked, just like implicite deref on (struct, class) member 
access. But I cannot have it work:

     auto a = [1,2,3];
     auto pa = &a;
     writeln((*pa)[2]);      // ok
     writeln(pa[2]);         // segfault

Denis
-- 
_________________
vita es estrany
spir.wikidot.com



More information about the Digitalmars-d-learn mailing list