Community
Participate
Working Groups
According to the ISO C++ standard (ISO/IEC 14882:2003), non-static member functions can have a CV qualifier (e.g. const, volatile, or const volatile). ICPPFunctionType, which applies to both member and non-member functions, declares isConst() and isVolatile(), but these two methods should really go into ICPPMethod since they don't apply to non-member functions.
Unlike mutable, this does affect semantic resolution. Methods can be overloaded solely based on this cv-qualifier (it affects the type of the implicit this parameter). Functions/Methods are compared based on type. I think that the isConst/isVolatile will need to stay in the IType instead of moving to ICPPMethod. I would suggest something like ICPPMethodType to extend ICPPFunctionType. Obviously callers of isConst will need to be updated for this change, particularily we will need to make sure IType.isSameType works correctly