Comment 2 for bug 1802954

Revision history for this message
John Beard (john-j-beard) wrote :

(Speculation alert) I guess this is done according to this pattern:

    T& CLASS::getMemberThing();
    const T& CLASS::getMemberThing() const;

Thus, if you only have a const CLASS, you can't use getMemberThing to get a non-const interface though which you can modify part of the CLASS.

But since it's returning a pointer, it's allowed to return a non-const T*.

I imagine this is a paste-o, and probably should be something like:

   T* CLASS::findRow();
   const T* CLASS::findRow(...) const;

At least, this appears to compile, FWIW!