Use member function pointers for the Profile::forEach function.