Skip to main content
navidcity
Associate II
January 16, 2023
Solved

C++20 syntax is not being supported by STM32CubeIDE

  • January 16, 2023
  • 7 replies
  • 7729 views

I'm writing C++ code wih STM32CubeIDE. Version of IDE is 1.11.0 and it comes with arm-none-eabi-g++ version 10.3-2021.10 . The compiler has some of C++20 features and I'm using them in the code.

The problem is some of them are not recognized by the IDE although the code compiles and runs flawlessly.

I can give3 examples that STM32CubeIDE has problem with them.

  1. Spaceship operator
  2. Concepts
  3. Constraints

0693W00000Y8JPbQAN.png0693W00000Y8JQUQA3.png0693W00000Y8JW3QAN.png

This topic has been closed for replies.
Best answer by Wijeden RHIMI

Hi again @navidcity,

More details:

  • In CDT, there is a component that is usually referred to as the “indexer�?.

This component is basically the first part of a compiler, but instead of generating assembler code, it will generate a model that can later be used to lookup function names etc.

  • The indexer has not really got much love in the last x years and thus, has not got the support needed for the recent C++ standards.

Unless someone is stepping in with funding and/or resources, this is likely not going to change anytime soon.

Best regards,

Wijeden,

7 replies

Wijeden RHIMI
ST Employee
January 16, 2023

Hello navidcity,

Could you please provide your main.h project which contains the definitions to understand well the issue and help us reproduce this behavior and further analyze it.

Best regards,

Wijeden,

AScha.3
Super User
January 16, 2023

did you set it in project options ?

(here set C17 )

0693W00000Y8LSDQA3.png

If you feel a post has answered your question, please click on " Best Answer ".
navidcity
navidcityAuthor
Associate II
January 16, 2023

Yes I did. It's set on C++20. As I stated, the whole project compiles and runs.

Wijeden RHIMI
ST Employee
January 17, 2023

Hello@ navidcity,

Please put those two information into your consideration :

  • The compiler accepts all C ++20.Syntax.
  • the Issue is related to CDT environment : it is not supporting C + + 20.syntax .

Don't hesitate to ask any more questions.

Wijeden,

navidcity
navidcityAuthor
Associate II
January 17, 2023

Then it's a known issue to you.

I think I have to wait for next versions of IDE.

With that being said, do you need the header file with definitions from me?

Wijeden RHIMI
ST Employee
January 17, 2023

Hi again@ navidcity,

Maybe yes you can wait for the next version .Also, i don't need the header file.

Thanks ,

Wijeden,

Wijeden RHIMI
Wijeden RHIMIBest answer
ST Employee
January 17, 2023

Hi again @navidcity,

More details:

  • In CDT, there is a component that is usually referred to as the “indexer�?.

This component is basically the first part of a compiler, but instead of generating assembler code, it will generate a model that can later be used to lookup function names etc.

  • The indexer has not really got much love in the last x years and thus, has not got the support needed for the recent C++ standards.

Unless someone is stepping in with funding and/or resources, this is likely not going to change anytime soon.

Best regards,

Wijeden,