I have a vector<int>
and functions that only accepts a vector<unsigned int>
references.I know that I could change/template the functions(and this is likely the best thing to do), but ideally I would have a way to cast/convert the vector<unsigned int>
reference to a vector<int>
reference. I know that all values in the vector are positive, and non of the functions will even come close to overflowing the intigers.
I have tried using static_cast<vector<int>>
but that doesnt work.
Edit: I say cast/convert of the references but I am not looking to create a new copy and reference that.