#include #include #include class A { private: int _x; public: A(int x): _x(x) {} int getX(){ return _x; } }; int main() { boost::shared_ptr x = boost::make_shared(0); return x->getX(); }