cancel
Showing results for 
Search instead for 
Did you mean: 

C++20 syntax is not being supported by STM32CubeIDE

navidcity
Associate III

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

1 ACCEPTED SOLUTION

Accepted Solutions
Wijeden RHIMI
ST Employee

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,

View solution in original post

7 REPLIES 7
Wijeden RHIMI
ST Employee

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
Chief III

did you set it in project options ?

(here set C17 )

0693W00000Y8LSDQA3.png

If you feel a post has answered your question, please click "Accept as Solution".

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

Wijeden RHIMI
ST Employee

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,

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

Hi again@ navidcity,

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

Thanks ,

Wijeden,

Wijeden RHIMI
ST Employee

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,