On Fri, 23 Sep 2011 16:19:15 -0400, so <[email protected]> wrote:

Hello everyone.

I asked this a few times with no response.
Could anyone explain me what is the rational behind this?
Why it won't distinguish mutable overload from immutable as in C++?

example? I'm afraid I don't really understand the question. overloads based on const/immutable are supported:

struct S
{
   void foo() { writeln("mutable");}
   void foo() const { writeln("const");}
   void foo() immutable { writeln("immutable");}
}

void main()
{
   S s;
   immutable(S) s2;
   const(S) s3;
   s.foo();
   s2.foo();
   s3.foo();
}

outputs:

mutable
immutable
const

-Steve

Reply via email to