and only capture the value of role: pointer to member function is not needed. (cherry picked from commit ecb88e92)