mutable使用例子:
Entity类里,我们需要m_name是const的,同时也需要用DebugCount统计GetName()的次数,这时候由于 GetName() const,成员变量不能改变,所以此时 DebugCount也不可以DebugCount++,这种情况下,我们就可以把DebugCount设置为mutable的
mutable使用例子:
Entity类里,我们需要m_name是const的,同时也需要用DebugCount统计GetName()的次数,这时候由于 GetName() const,成员变量不能改变,所以此时 DebugCount也不可以DebugCount++,这种情况下,我们就可以把DebugCount设置为mutable的