Moved inst into the main build tree under re_gen.
C++11: Use std::function instead of boost::function.