类模板 使用iterator在VS2010编译通过,g++ 3.4.6报错
出错行
std::queue< T >::const_iterator iter = _queue.begin();
报错信息
src/BlockingQueue.h: In member function `bool BlockingQueue<T>::contains(const T&) const':
src/BlockingQueue.h:61: error: expected `;' before "iter"
src/BlockingQueue.h:62: error: `iter' was not declared in this scope