The code is working normally on Visual Studio 2005. However, in visual studio 2010 with new rvalue reference feature vector class has been upgraded. So in this code it is throwing exception.#include <vector>#include <iostream>using namespace std;int main(){ vector<vector<int>> testVec; vector<int> vec; //if this is included code is working successfully, otherwise throws exception. //testVec.reserve(2); testVec.push_back(vec); testVec.insert(testVec.end(), testVec.at(0)); //exception is throwed here return 0;}
Visual Studio/Team Foundation Server/.NET Framework Tooling version
Steps to reproduce
Product Language
Operating System
Operating System Language
Actual results
Expected results
Please wait...