Wording of GCC’s error message when calling lvalue-ref qualified member function on temporary object

This is just a case of a suboptimally worded error message in GCC.

My guess would be that in GCC’s implementation, diagnosing a mismatch between differing ref-qualifiers shares some code with diagnosing a mismatch between const and non-const, and they reused the same error message.

I would encourage you to file a GCC bug suggesting an improvement to the error message.

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top