All pastes #1894379 Raw Edit

mutable

public cpp v1 · immutable
#1894379 ·published 2010-07-04 14:08 UTC
rendered paste body
#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();}