Which is better:
bool MyClass::someQuery() const; const bool MyClass::someQuery() const;
I\'ve been using \'const bool\' since I\'m sure I
const return type
SUMMARY: The value of a return type that is declared const cannot be changed. This is especially usefull when giving a reference to a class’s internals, but can also prevent rarer errors.
SUMMARY:
The value of a return type that is declared const cannot be changed. This is especially usefull when giving a reference to a class’s internals, but can also prevent rarer errors.