以下の変換は可能ですか?boost::lambda と単純なバインドを試しましたが、foo を処理して bar を呼び出す特別なヘルパー クラスを使用せずに変換をインプレースで行うのに苦労しています。
struct Foo {}; // untouchable
struct Bar {}; // untouchable
// my code
Bar ConvertFooToBar(const Foo& foo) { ... }
void ProcessBar(const Bar& bar) { ... }
boost::function<void (const Foo&)> f =
boost::bind(&ProcessBar, ?);
f(Foo()); // ProcessBar is invoked with a converted Bar