Executing bound std::function throws std::bad_function_call
问题 I want to bind a member function to a std::function<void(void)> . I heard that member functions take one extra parameter which is the instance pointer. Therefore I call std::bind(&Class::Function, this, parameter) but when I execute the function object, it throws a runtime error. Unhandled exception at at 0x748D4B32 in Application.exe: Microsoft C++ exception: std::bad_function_call at memory location 0x0114F4E8. The parameter is a pointer to one of my own struct s. How am I doing wrong? What