Which is better:
bool MyClass::someQuery() const;
const bool MyClass::someQuery() const;
I\'ve been using \'const bool\' since I\'m sure I
To be a little more specific, only "objects" can be const. The C++ standard's definition of "object" includes everything an lvalue refers to ("has a name") and class-type temporaries. A boolean return value is an rvalue of a non-class type which is why a standards-compliant compiler will just ignore "const" in this case. As others said already, it's useless in this context.