c++ bind function to instance