有在task.json中添加“-std=c++11” 在settings.josn也添加了 gcc编译器也支持c++11但是依然无法使用move()会报错,无法编译,这应该怎么解决
#include <iostream>
#include <vector>
using namespace std;
//=====1.测试右值引用和move语意
bool is_r_value(int &&) { return true; }
bool is_r_value(const int &) { return false; }
void test(int && i)
{
is_r_value(i);
is_r_value(std::move<int>(i));
}
怎么才能使编译通过
std::move是模板函数,不需要的