| Summary: | Typedefs for nested template classes not considered in C++ Assistant | ||
|---|---|---|---|
| Product: | [Applications] kdevelop | Reporter: | Thomas McGuire <mcguire> |
| Component: | Language Support: CPP (Clang-based) | Assignee: | kdevelop-bugs-null |
| Status: | CONFIRMED --- | ||
| Severity: | wishlist | CC: | craftplace.ms, david.nolden.kde |
| Priority: | NOR | ||
| Version First Reported In: | git master | ||
| Target Milestone: | --- | ||
| Platform: | Compiled Sources | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
This is not easy to do, as the _real_ type of the object you're dealing with simply _is_ "Outer<int, int>::Inner", and nothing else. I guess I'll try to work around this at some point, but still marking it as wishlist item. I tried to reproduce the bug in KDevelop 5, judging by that has turned out, maybe he's still there. http://i.imgur.com/dkrala2.png Thanks Andrey! |
Version: (using Devel) OS: Linux Installed from: Compiled sources Consider the following code snippet: template<typename a, typename b> class Outer { class Inner { }; Inner getInner() {}; }; typedef Outer<int,int> SmallOuter; void test() { SmallOuter outer; inner = outer.getInner(); } Now, say the cursor is in the "inner = outer.getInner()" line. KDevelop's assistant will now offer to add the type to "inner", which is really useful. However, it doesn't consider typedefs here, i.e. it offers to add "Outer<int, int>::Inner", while it should offer "SmallOuter::Inner". This actually happens very often, since that is exactly how iterators on template lists are structured.