In Bjarne Stroustrup\'s home page (C++11 FAQ):
struct X { int foo(int); }; std::function f; f = &X::foo; //pointer to membe
g++ seems to have an union which may keep either function pointer, member pointer or void pointer which probably points to a functor. Add overloads which appropriately flag which union member is valid and heavy casting to a soup and then it works...