digitalmars.D.learn - I thought we could leave off ()
- Brett (5/5) Oct 17 2019 auto n = (){ return Z[0]; };
- Adam D. Ruppe (7/8) Oct 17 2019 that's a pointer, the optional () rule only applies to direct
auto n = (){ return Z[0]; };
n().X = X;
I'm trying to alias nodes away but alias n = Z[0]; fails.
Dropping () from n().X fails also.
Oct 17 2019
On Thursday, 17 October 2019 at 10:50:52 UTC, Brett wrote:
auto n = (){ return Z[0]; };
that's a pointer, the optional () rule only applies to direct
functions, not pointers/delegates.
so do
auto n () { return Z[0]; }
n.X
no assignment means function instead of pointer/delegate
Oct 17 2019








Adam D. Ruppe <destructionator gmail.com>