Community
Participate
Working Groups
According to section 7.1.1.8 of the April 2003 draft of the ISO C++ standard (14882:2003), functions aren't allowed to have the storage class "mutable". Although the grammar allows it, the standard says it can only be applied to names of non-const/non-static/non-reference data members. However, ICPPFunction declares the method isMutable(). Are there any variants of C++ that allow mutable functions? Or is it safe to take this out?
The grammar is allowed to be permissive with what it accepts. However, you are correct, the IASTNodes/IBindings/ITypes should not. I'm not sure if this an oversight. The Niefer had the spec open beside him for the two years he worked on this stuff so he would know best why it's there.
I confess that I didn't look particularily closely at the spec with regard to the mutable storage class specifier. We don't have any semantic code that cares about it. Jason is correct, mutable does not apply to functions. And in fact, neither do register or auto which appear on IFunction. (I double checked the C spec as well for those two). The only variant that we made an effort to support is GCC, so I would expect these are safe to remove. For reference sake, we used 14882:1998 for C++ and 9899:1999 for C.