Pass a class' member function in to a callback function?
===

I have this template:

    template <class T> v8::Handle<v8::Value> jsFunctionTemplate(const v8::Arguments &args) {
        T *t = static_cast<T*>(args.This()->GetPointerFromInternalField(0));
        if (t != NULL) t->volume(args[0]->NumberValue());
        return args.This();
    }

I want to make it 100% dynamic, so I'm hoping to replace `t->volume` with a pointer (std::mem_fn?). The thing is, I can't figure out from similar examples/questions how to retain the jsFunctionTemplate's current type (it must be a `v8::InvocationCallback`)

    typedef Handle<Value> (*InvocationCallback)(const Arguments& args);

So that it's usage can still be:

    audio->PrototypeTemplate()->Set("Volume", v8::FunctionTemplate::New(&jsFunctionTemplate<Audio>));

I am not opposed to using even C++11 syntax.