3 ms·
note that, in C++, pointers to member functions do not close over 'this' [1], so they are not really a reference to a method of an object, i.e. you need to prov
by gpderetta 10y ago
note that, in C++, pointers to member functions do not close over 'this' [1], so they are not really a reference to a method of an object, i.e. you need to provide the actual object externally to invoke the pmf.
The closure need to be created explicitly with something like std::bind or an actual lambda, and passed around as an std::function (a type erased, generic closure wrapper) or as a template parameter.
/pedantic
[1] GCC does have a very old extension that actually creates the closure.