65,209
社区成员
发帖
与我相关
我的任务
分享
#include "stdafx.h"
#include <iostream>
#include <string>
#include <functional>
using namespace std;
void funR_VlaueReference(int && a)
{
std::cout << L"R_VlaueReference" << std::endl;
return;
}
int _tmain(int argc, _TCHAR* argv[])
{
std::function<void(int&&)> fun = std::bind(funR_VlaueReference, std::placeholders::_1);
return 0;
}
我用17也编过了~~就是现在需要用13编译库,然后有个上述代码的错误~~寻思怎么把类型转化下就OK~
vs2017
auto xx = std::bind(funR_VlaueReference, std::placeholders::_1);
xx(3); 这时候就会报错 int to int&&