...but I have another question. When I'm doing the below to free the memory of a std::vector<int>:
Code:
theVector.clear();
theVector.swap(std::vector<int>());
...I'm getting this warning at warning level 4:
Code:
warning C4239: nonstandard extension used : 'argument' : conversion from 'std::vector<_Ty>' to 'std::vector<_Ty> &'
1> with
1> [
1> _Ty=int
1> ]
1> A non-const reference may only be bound to an lvalue
The code is working to free the vector but if possible I'd like to get rid of the warning. What to do?