あの。質問です。下のコードがコンパイルエラーになるのですが・・
ローカルクラスオブジェクトは std::for_each() などのファンクタに
指定することはできないのでしょうか?

#include <iostream>
#include <vector>

int main( void) {
 struct F {
  void operator()(const int & i) const {
   std::cout << i << std::endl;
  };
 };
 std::vector<int> vec;
 vec.push_back(100);
 vec.push_back(200);
 std::for_each(vec.begin(),vec.end(),F());
 return EXIT_SUCCESS;
}