preparing for const, final, and invariant

Manfred Nowak svv1999 at hotmail.com
Fri May 18 13:22:17 PDT 2007


torhu wrote

> It does make a copy, but if g is 'scope', you're only allowed to
> have local copies of a.
> 
> This would be fine:
> 
> int[] b = a;

I understand this exactly as you say it: only local copies are allowed!

But `writef( &b);' as well as `writef( &a);' may create global copies, 
i.e. at least not local copies.

If this holds, then the scope-rule forbids printing out.

But Walter responds with "Making copies is allowed." Which seems to 
mean, that global copies are allowed by printing out---or his remark 
has nothing to do with the problem stated.

How to resolve this contradiction?

-manfred



More information about the Digitalmars-d-announce mailing list