#include <iostream>class A{public: A() {a = new int(5); std::cout << "const " << a << std::endl;} int* getA() const {return a;} ~A(){delete a;} private: A(const A&){} int* a;};void f(const A& a){ std::cout << *a.getA() << std::endl;}int main(){ f(A()); return 0;}
C++ (Qt)A a;f(a);