How to insert member function in pair of vector where one pair is member function, do I need to use std::bind to bind the member function ?
class Notification
{
std::vector<std::pair< std::string, std::function<void(const std::string&
, std::string)>>> NotificationReq;
public:
Notification()
{
NotificationReq.push_back(std::make_pair("NTFY_OCIS_REBOOT", TestReboot));
}
void TestReboot(const std::string& , std::string)
{
}
};
int main()
{
Notification temp;
}
I m getting compilation error: reference to non-static member function must be called. Please can some one help me out to solve this issue?? Thanks