I have the following boilerplate method:
template <class T> void Class::setData( vector<T> data ) { vector<T>::iterator it; }
and I get the following compilation error (Xcode / gcc)
error: expected `; 'before' it
I found someone else with a similar problem here (read to see it the same way, even if it starts with a different problem) but they seem to have solved by updating Visual Studio. This makes me guess that this is a compiler problem and that it should compile, is that correct? Iterating through indexing from 0 to size works, however this is not the way I would prefer to implement this function. Is there another way? Thanks
source share