I have a class called Info.
I tried creating a unique_ptr vector to hold a list of this class.
The map contains the key as a string and unique_ptr as the value.
But when I try retrieving the value from the map and try to put it into a vector to form the list, VS2010 compiler gives an error : error C2664: 'void std::vector<_Ty>::push_back(_Ty &&)' : cannot convert parameter 1 from 'std::vector<_Ty>' to 'std::unique_ptr<_Ty> &&'
vector<unique_ptr<Info>> sInfo;
QMap<QString,vector<unique_ptr<Info>>>::Iterator iterMap;
for(iterMap = map_sInfo.begin(); iterMap != map_sInfo.end(); ++iterMap)
{
vector<unique_ptr<Info>>sValue = iterMap.value();
sInfo.push_back((sValue)); //error C2664
}
How do I make the Any help regarding this would be much appreciated.