iterators again
David B. Held
dheld at codelogicconsulting.com
Sat Jun 2 15:00:12 PDT 2007
Bruno Medeiros wrote:
> [...]
> So
> typeof(foo) is: final Foo
> but
> typeof(*(&foo)) is: const(Foo)
> which seems a breach in orthogonality, and meaning that this won't be
> allowed:
> (*(&foo)).membervar = 42;
Can you produce a realistic scenario where you need to take a pointer to
a final and get back the exact type? Most of the time, you shouldn't
even need to take addresses in D. Most uses of pointers is with dynamic
allocation.
Dave
More information about the Digitalmars-d
mailing list