2021-11-29 05:45 AM
Hello.
CubeIDE 1.8.0 now includes STM32 toolchain based on GCC 10.3.1 which supports C++20, but the IDE still can't correctly parse C++17 syntax, like Class Template Argument Deduction guides.
I tried to force '-std=c++17' option to Language Settings Proveder (it worked for C++11 few years ago) but with no success. Are there any plans to fix this?
2021-12-02 02:46 AM
Hello Stepan!
I have written a ticket to the development team about adding support for C++17. I will update this discussion once I hear anything back. (Internal ticket number 118796)
PS: Internal tracking number is not accessible or usable by customers
2021-12-02 04:08 AM
Hello,
Thank you for raising this up. Small update:
Adding `-std=c++17` to settings provider actually has a slight effect. It makes the macro `__cplusplus` to have a value of 201703L instead of 201402L so some language features like std::optional becomes correctly defined, but indexer still does not understand the new syntax like CTAD mentioned in original post.
Connected to this, LL and HAL libraries are not compatible to C++17 because they frequently use the `register` keyword which has been removed in C++17. I will post a separate issue for that.
2021-12-02 04:23 AM
Update²:
The `register` keyword issue seems to be fixed in the newest releases of CMSIS and LL libraries, however it's still present in many example projects.
2021-12-03 01:55 AM
Hello again Stepan,
The toolchain itself supports C++17. However, what you are mentioning about the indexer is not planned to be supported. At least not from our side. There was a decision taken in CDT that, unless someone steps forward and start working on the indexer, they won't fully support C++17.
We don't have the resources to do it, so we will just follow CDT in this regard.