Entry tags:
again with the C++/STL
This worked for someone at some point:
update: It appears that putting typename before the declared type fixes it. I will just shake my head and continue patching rather than passing further comment on this.
deque<T>::iterator iter = container.begin ();Can someone better versed in C++/STL tell me how to make such a thing work in gcc 4? I've tried various combinations of adding std, adding and removing bits of the object typing at random, separating the declaration from the usage, and googling for "good code" to do the job. Mostly, I seem to be finding documents telling me what a deque is, combined with a few that give the exact format above as the way to use it. For context, this is inside a templated operator function like this:
template <class T> ClassName& operator>>(deque<T>& container)and the compiler is complaining that it expects a ; before iter which suggests to me that the inline declaration somehow isn't working.
update: It appears that putting typename before the declared type fixes it. I will just shake my head and continue patching rather than passing further comment on this.
