static foreach and new identifier names
Adam D. Ruppe
destructionator at gmail.com
Fri Jan 5 18:33:52 UTC 2018
On Friday, 5 January 2018 at 18:07:54 UTC, H. S. Teoh wrote:
> Simple solution: add another pair of {} to create a nested
> scope:
That's illegal outside of functions, though, which is the place
static foreach is special!
Also, introducing a new scope means you can't expose that stuff
to the outside world, which defeats the point. (I had tried doing
that and using the alias outside but still fails.) Note that my
declarations here are NOT temporary - the reason I'm trying to
use static foreach is to introduce new public members to the
scope.
More information about the Digitalmars-d
mailing list