Hello,
While trying out some C++ code within uVision, I have noticed that the autocomplete/intellisense does not work for template types.
Are there any plans to improve the autocomplete/intellisense in uVision such that it works also for C++ template types?
Have you tried this with the https://studio.keil.arm.com/ or with the Arm Keil Studio Pack ? Do those behave better?
I would guess that those behave better, but neither is currently an option for me.
Arm Keil Studio Pack I keep an eye on, but so far it's been too much of a mess to deal with.
Can you please try this with MDK 5.38a to see, if it works there?
I do not currently have any MDK 5.38a installation to test with.I had to upgrade to fix other weirdnesses.
Ok, can you then share your example project so we can try this if you are not able to? Installing MDK5.38a should be simple, just use a different folder to install it.
I will see about setting up something soon for testing, or provide an example project.
After trying to set up an example project, I discovered that the intellisense is even quirkier than I thought...The current example is made with ARMCM4 device for as simple project as possible.
Very short and simple example.A header file containing only the code
template<auto N> class A1{ public: void B(void) {}};class A2{ public: void B(void) {}};
template<auto N> class A1
{
public:
void B(void) {}
};
class A2
And project configured to use gnu++17 for C++
A warning about "'auto' type specifier is incompatible with C++98" and another about incompatibility before C++17...Despite project settings clearly indicating to use gnu++17 (setting c++17 in the settings have same effect)
Adding
#include "ARMCM4.h" to the header... and the intellisense warnings disappear.
And it seems as if what I originally asked about is not occurring now in this example...If I try the same in the project that I tested with originally, the original issue is not resolved yet.I have not yet tried on MDK 5.38a, but with this I have additional things that need looking at before I can draw any conclusions.
After preparing a project to test with, and running a number of tests with MDK5.38a and MDK5.39...Results:
Intellisense works for the scenario if I use:
MDK5.38a with ACOMPE 6.19 (default for MDK5.38a)MDK5.38a with ACOMPE 6.21 (from standalone install)MDK5.39 with ACOMPE 6.19 (standalone)MDK5.39 with ACOMPE 6.20 (standalone)MDK5.39 with ACOMPE 6.20.1 (standalone)
But NOT with MDK5.39 with ACOMPE 6.21 (included with MDK)
Comparing the compiler binaries show that the ACOMPE 6.21 included with MDK5.39 is not identical to the standalone.Project archive can be found at InSenTest.zipIf necessary I will provide it through other means as well.
In the project, to repro, open test1.cpp, erase the line with a.B(); and type a. manually and no intellisense pops up with MDK5.39 with ACOMPE 6.21 as included with MDK.
Forgot to add that if I comment out the line with #include <array>, the intellisense works again also for MDK5.39 case with ACOMPE 6.21.
While the example does not need that include, the original code in which I found the issue, does need the include.
Thanks for all the tests. That the unmodified MDK 5.38a installation works proves the theory. MDK uses the libclang.dll in the compilers bin folder to parse the source code. In MDK 5.39 the libclang.dll installed with MDK was an older one (older than what was shipped with MDK5.38a and sill with other shortcomings as it turns out like in your case) due to some other issues that happened with this version in MDK 5.38a. The next MDK 5.40 will have fixed that issues and so also the latest version of libclang.dll can be used again.
Thank you for the confirmation and information.Is there any timeframe available for when MDK 5.40 will be released?