Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
Qt Creator 3.5.0-beta1
-
None
-
2070431d8ca867acfb4391c275cd82caff4d711a, 997ab425ce5cb0797101acadcfe9217ea1aa6813
Description
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.