const by default.

Brad Roberts braddr at puremagic.com
Fri Jul 7 16:06:59 PDT 2006


Walter Bright wrote:
> class C { int m; }
> 
> void bar(C c) { c.m = 3; } // ok
> 
> void foo(in C c) { bar(c); } // ok

I have a problem with this chain..  Foo shouldn't be allowed to pass a 
const thing into a function that wants a mutable thing.



More information about the Digitalmars-d mailing list