-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
Qt Creator 3.5.0-beta1
-
None
-
2070431d8ca867acfb4391c275cd82caff4d711a, 997ab425ce5cb0797101acadcfe9217ea1aa6813
Example:
test.cpp
struct b {};
template<class X, class Y>
struct s
{
float f;
};
template<class X> // l.9
struct s<X, b>
{
int i;
};
void f()
{
s<int, b> var;
(void)var.i;
}
This compiles on clang++, but Qt Creator suggests that var has only a member "f".
Note: Specializing the first parameter instead of the second does not work either:
first.cpp
template<class Y> struct s<int, Y> { /*...*/ };
Note: If you make line 9/10 a full specialization, Qt Creator recognizes everything correctly., i.e. this works:
full.cpp
template<> struct s<int, b> { /*...*/ };
Again, I'm not sure whether this is a bug or a wanted feature for saving runtime.
| For Gerrit Dashboard: QTCREATORBUG-14036 | ||||||
|---|---|---|---|---|---|---|
| # | Subject | Branch | Project | Status | CR | V |
| 108480,2 | CppTools: Add a failing test for partial template specialization | 3.4 | qt-creator/qt-creator | Status: MERGED | +2 | 0 |
| 113373,2 | C++: Fix resolving of partial specialization | master | qt-creator/qt-creator | Status: MERGED | +2 | 0 |
| 113799,10 | C++: Improve accuracy in findSpecialization | master | qt-creator/qt-creator | Status: MERGED | +2 | 0 |