Problems with const/non-const overloads of member functions
richard.webb at boldonjames.com
Fri Jun 25 06:09:07 PDT 2010
Using the latest DMD2, the code:
void foo() const
void bar() const
fails to compile with the error:
constest.d(15): Error: function constest.c1.foo () is not callable using
argument types () const
However, if i either:
1) Change bar() to call this.foo() or
2) switch the 2 foo()s so that the const version is defined second.
The it compiles ok.
There are various const related issues in the bug tracker, but i don't
immediately see this one. Anyone know if it's a known thing?
More information about the Digitalmars-d-learn