誰かがこのコードを説明してもらえますか?
struct Class {
boost::function<void()> member;
};
Class c;
boost::function<boost::function<void()>()> foo = boost::bind(&Class::member, &c);
boost::function<void()> bar = boost::bind(&Class::member, &c);
なぜbar
コンパイルの定義が行われ、その結果は何ですか?
編集:foo()
期待どおりに動作し、 を呼び出しますc.member()
が、bar()
動作しません。