Firstly, this has nothing to do with Murphy, I would think: choosing a bind() template is probably only better. The std::bind() declaration is in the std , however, at least in the version of the header file I'm looking at. Is it possible that your source file contains a using directive? (in this case, you deserve all the pain you asked for)
If the directive is not used, a version other than the template should be better if the arguments match exactly . If this still does not help, you can create a forwarding function for the bind() function from <sys/socket.h> , say, avoid_conflict_bind() , which is the only function defined in the translation block, that is, it will only include <sys/socket.h> and not <functional> . Thus, for the bind() function, this function will not be selected, and you can use avoid_conflict_bind() .
source share