C++ならできるからg++使えってのはあり?

#include <boost/tr1/functional.hpp>
#include <boost/utility/result_of.hpp>
#include <cstdio>

template<typename T>
T g(T x)
{
  return x + 1;
}

template<typename T>
typename boost::result_of<T ()>::type
f(T g)
{
  return g();
}

int main()
{
  std::printf("%d\n", f(std::tr1::bind(g<int>, 1)));
}