64,648
社区成员
发帖
与我相关
我的任务
分享
#include <boost/bind.hpp>
#include <string>
struct test_t
{
int add(int x, int y)
{
return(x + y);
}
};
int main(int, char * [])
{
test_t test;
boost::bind(&test_t::add, test, 2, 3)(); // ok
std::string all;
std::string abc("abc");
boost::bind(&std::string::append, all, abc)(); // error
return(0);
}
static_cast<std::string& (std::string::*)(const std::string&)>(&std::string::append)