mutable
public cpp v1 · immutable#include <iostream>using namespace std;class Objekt{ public: Objekt() :aufruf(0) { } void test() const { cout << "Aufruf #" << ++aufruf << endl; } mutable int aufruf;};int main(){ const Objekt o; o.test(); o.test(); o.test();}