-
Bug
-
Resolution: Done
-
P2: Important
-
Qt Creator 3.4.0-rc1
-
None
This looks like the final blocker for supporting stl iterators, at least the gcc implementation.
Test added in CppTools,test_completion:pointer_partial_specialization.
template<typename T>
struct Traits { typedef typename T::pointer pointer; };
template<typename _Tp>
struct Traits<_Tp*> { typedef _Tp *pointer; };
template<typename _Tp>
struct IndirectT
{
typedef Traits<_Tp> TraitsT;
typedef typename TraitsT::pointer pointer;
pointer p;
};
template<typename T>
class Temp
{
protected:
typedef Traits<T> TraitsT;
typedef T *TPtr;
public:
typedef typename TraitsT::pointer pointer;
typedef IndirectT<pointer> indirect;
pointer p;
indirect i;
};
struct Foo { int bar; };
class Temp2
{
protected:
typedef Foo *FooPtr;
typedef Traits<FooPtr> TraitsT;
public:
typedef typename TraitsT::pointer pointer;
pointer p;
};
void func()
{
Temp<Foo *> t;
Temp<Foo *>::indirect i;
Temp2 t2;
t.p->bar; // bar not highlighted
i.p->bar; // bar not highlighted
t2.p->bar; // bar not highlighted
}
My observation:
ClassOrNamespace::nestedType receives unexpanded Traits<T>. Then when it tries to find a specialization, T (as opposed to Foo *) is not a pointer, so the specialization is not determined.
- is required for
-
QTCREATORBUG-8922 Code completion does not work for std::vector of objects
-
- Closed
-
There are no Sub-Tasks for this issue.
| For Gerrit Dashboard: QTCREATORBUG-14141 | ||||||
|---|---|---|---|---|---|---|
| # | Subject | Branch | Project | Status | CR | V |
| 109327,3 | CppTools: Add another failing test for indirect pointer specialization | 3.4 | qt-creator/qt-creator | Status: MERGED | +2 | 0 |
| 109330,7 | C++: Fix specialization resolving for pointer typedefs | 3.4 | qt-creator/qt-creator | Status: ABANDONED | -2 | 0 |
| 109539,7 | C++: Fix specialization resolution for nested types | 3.4 | qt-creator/qt-creator | Status: ABANDONED | 0 | 0 |
| 109620,4 | C++: Fix double indirection of pointer specialization | 3.4 | qt-creator/qt-creator | Status: ABANDONED | 0 | 0 |
| 109738,17 | C++: Fix specialization resolving for pointer typedefs | master | qt-creator/qt-creator | Status: ABANDONED | -1 | 0 |
| 109739,22 | C++: Fix specialization resolution for nested types | master | qt-creator/qt-creator | Status: MERGED | +2 | 0 |
| 109740,5 | C++: Fix double indirection of pointer specialization | master | qt-creator/qt-creator | Status: ABANDONED | -2 | 0 |
| 111709,2 | C++: Fix highlighting of member on indirect specialization typedef | master | qt-creator/qt-creator | Status: MERGED | +2 | 0 |