Community
Participate
Working Groups
The implementation of CPPClassSpecialization is incomplete and its method getBases is wrong. For better template handling we would want at least correct implementations of getBases, getConstructors, getConversionOperators and createDelegate. Below are 2 examples of code where content assist fails because of the getBases. Example 1: class Base { public: int b1; }; template <class T> class A { class C : public T {}; }; int main(int argc, char **argv) { A<Base>::C c; c.b[CTRL-SPACE]; } Content assist fails for b. c's type, A<Base>::C, is a CPPClassSpecialization. Example 2: class Base { public: int b1; }; template <class T> class A { }; template <> class A<Base> : public Base { } int main(int argc, char **argv) { A<Base> a; a.b[CTRL-SPACE]; } a's type is the explicit specialization of the template, and is a CPPClassSpecialization.
Created attachment 61840 [details] proposed patch Patch implements the required methods of CPPClassSepcialization. Also, the behaviour of getCompositeScope() now depends on whether or not the class specialization is explicit. If it is not explicit, the scope behaves the same way as a CPPClassInstance's scope, by specializing everything in the scope.
Getting to it...
Patch applied. Thanks!