型を消すのはfunctionとbindに任せてしまおうという作戦。 #include <boost/function.hpp> #include <boost/bind.hpp> class GameScene { boost::function<void()> update_func_; boost::function<void()> draw_func_; public: GameScene() {} template <class T> GameScene(T& obj) : update_func_(boost::bind(&T::update, obj)), draw_func_(boost::bind(&T::draw, obj)) {} template <class T> GameScene& operator=(T& obj) { update_func_ = boost