pointers, functions, and uniform call syntax

Dmitry Olshansky dmitry.olsh at gmail.com
Mon Sep 3 13:09:32 PDT 2012


 >>
 >> In C++, I often did it with iterators:
 >> ----
 >> for(it ...)
 >> {
 >>     int& val = *it;
 >>     //now, we can access it with value semantics through val.
 >> }
 >> ----
 >>
 >> ?

with(it) should help a lot but here. Still it was bogus back then when I 
used it with pointers, not sure how good it is now.

 >
 > Good question, I've proceeded in the same way in C++ many times. I hope
 > there's a way, but I think it likely there is not, except by passing *it
 > to a function with a reference parameter.
 >
 >


-- 
Olshansky Dmitry


More information about the Digitalmars-d mailing list