Transitive const sucks
Janice Caron
caron800 at googlemail.com
Wed Sep 12 07:27:20 PDT 2007
> "const int void f()" is clearly a bad declaration. Anyway, "const int
> f()" is a function returning a const int, not a const function returning
> an int, so you wouldn't be able to call it through a const reference.
See thread "properties and const"
The D syntax for "member function which does not modify member
variables" is sort of a bit unclear. In C++ I would have written "int
void f() const", but that's not how it goes in D.
More information about the Digitalmars-d
mailing list