According to my comments, this is simply not possible. You can file a bug report and hope that they are fixed. To better explain, this has something to do with the implementation of std :: vector:
reference operator[](difference_type _Off) const {
In which the reference typedef'ed as Allocator::reference . Qt Creator seems to have problems following this first class. Compare this to QVector ...
inline T &QVector<T>::operator[](int i) { Q_ASSERT_X(i >= 0 && i < d->size, "QVector<T>::operator[]", "index out of range"); return data()[i]; }
... which is defined directly in terms of T &, and you can understand why it works for him.
Update: look at the cppreference page on the vector , it seems that after C ++ 11 the link should be printed as simply value_type &. I tried building with CONFIG += c++11 , but it still doesn't work.
And another update: handled with a minimum test case code that doesn't work
template<typename T> class foo{ public: typedef T value_type; typedef value_type& reference; T a; reference operator[](int){return a;} }; struct bar{int b;};
CΓ‘ssio renan
source share