나는 이것을 원한다고 생각합니다.
typedef int(std::string::*resolve_type)(const char*) const;
예.
http://liveworkspace.org/code/4971076ed8ee19f2fdcabfc04f4883f8
#include <iostream>
#include <functional>
typedef int(std::string::*resolve_type)(const char*)const;
int main()
{
resolve_type resolver = &std::string::compare;
std::string s = "hello";
std::cout << (s.*resolver)("hello") << std::endl;
}
그리고 예를
#include <iostream>
#include <functional>
typedef int(std::string::*resolve_type)(const char*)const;
int main()
{
resolve_type resolver = &std::string::compare;
std::string s = "hello";
auto f = std::bind(resolver, s, std::placeholders::_1);
std::cout << f("hello") << std::endl;
}
http://liveworkspace.org/code/ff1168db42ff5b45042a0675d59769c0
안녕 영원히 바인드와. 고마워요 (일부 지연) 괜찮아요 일을 많이하고 나는 실종에 대해 깨닫지 못했 : :. –