#include #include using namespace std; class obj { int i; public: obj(int initial_i) {i = initial_i; f();} void f() {cout << "I am not currently a const object.\n";} }; int main() { const obj o(10); //will compile, even though constructor calls f //o.f(); //won't compile: too late to call f return EXIT_SUCCESS; }