fix std::function match for std::function<Ref *()>