Re: Object removing own last reference.

2010-06-25 Thread Simen kjaeraas
strtr st...@sp.am wrote: void externalFunc(){} class C { .. int index_; int yay; void removeMe() { //remove last reference to this object objects[_index] = null; //other critical code memberFunc(); externalFunc(); } void memberFunc(){yay++} } Is there

Problems with const/non-const overloads of member functions

2010-06-25 Thread Richard Webb
Using the latest DMD2, the code: // class c1 { void foo() const { } void foo() { } void bar() const { foo(); } } // fails to compile with the error: constest.d(15): Error: function constest.c1.foo () is not callable using argument types () const However, if

Re: Problems with const/non-const overloads of member functions

2010-06-25 Thread Steven Schveighoffer
On Fri, 25 Jun 2010 09:09:07 -0400, Richard Webb richard.w...@boldonjames.com wrote: Using the latest DMD2, the code: // class c1 { void foo() const { } void foo() { } void bar() const { foo(); } } // fails to compile with the error: constest.d(15):

Re: Object removing own last reference.

2010-06-25 Thread strtr
== Quote from Simen kjaeraas (simen.kja...@gmail.com)'s article strtr st...@sp.am wrote: void externalFunc(){} class C { .. int index_; int yay; void removeMe() { //remove last reference to this object objects[_index] = null; //other critical code