It doesn’t say why. Compare two GCC reports: error: must be a non-static member function and warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister] More clear error message as for me may be: error: ISO C++ does not allow non-static member function 'R* operator->(const R&)' Yes, I already know why that operator must be that. https://en.cppreference.com/w/cpp/language/operators Stryzhniou Fiodar Стрижнёв Федор