class Test { bool isVal() const { return isVal; } private: bool isVal; };
On Compiling this file it says
Functions in c/c++ are just pointers to a location in memory where the code is located, isVal (as a boolean) and isVal (as a function) are therefore ambiguous.