Functions modifiers in front of the function should be reported as warnings or even errors.
class X {
const int* f() { return null; } // should give a compiler warning
int* g() const { return null; }
}
In the above code it is too easy to confuse it with const(int*). This is VERY unreliable and should be warned loudly when somebody does this.
Comment #1 by robert.schadek — 2024-12-13T19:01:59Z