The story begins with something I thought pretty simple :
I need to design a class that will use some STL containers. I need to give users of the class access to an
The painful solution:
/* YOU HAVE NOT SEEN THIS */ struct mutable_int { mutable_int(int v = 0) : v(v) { } operator int(void) const { return v; } mutable_int const &operator=(int nv) const { v = nv; return *this; } mutable int v; };
Excuse me while I have to punish myself to atone for my sins.