'identifier' の宣言に、'specifier' 指定子を使用することはできません
注釈
宣言で mutable 指定子が使用されましたが、このコンテキストでは指定子は許可されていません。
mutable 指定子はクラスのデータ メンバーの名前にのみ適用でき、const または static として宣言された名前には適用できません。また、参照メンバーにも適用できません。
例
次の例は、C2178 がどのように発生する可能性があり、それを修正する方法を示しています。
// C2178.cpp
// compile with: cl /c /W4 C2178.cpp
class S {
mutable const int i; // C2178
// To fix, declare either const or mutable, not both.
};
mutable int x = 4; // C2178
// To fix, remove mutable keyword