Хабр Курсы для всех
РЕКЛАМА
Практикум, Хекслет, SkyPro, авторские курсы — собрали всех и попросили скидки. Осталось выбрать!
void check4()
{
typedef function<int (void)> int_function_t;
int_function_t f1;
Bar bar;
f1 = std::bind(&Bar::callMe, bar, 10);
cout << "calling binded member function with signature int (void): " << f1() << endl;
}error: no match for ‘operator=’ in ‘f1 = std::bind(_Func&&, _BoundArgs&& ...) [with _Func = int (Bar::*)(int); _BoundArgs = {Bar&, int}; typename std::_Bind_helper<std::__is_socketlike<_Func>::value, _Func, _BoundArgs ...>::type = std::_Bind<std::_Mem_fn<int (Bar::*)(int)>(Bar, int)>]((* & bar), (* &10))’
Пишем свой std::function (boost::function)