2026-01-15 3:10 AM - edited 2026-01-15 3:18 AM
Hello,
recently I started a project based on a STM32L433RCT3 and the STM32CubeIDE build tooling defaults to C++14. I myself am cautious about bleeding-edge standards but C++14 seems a bit conservative in 2026. I tried both the GCC 13.3 and GCC 14.3 toolchains and C++14 was the default in both, while C++17 is the default of GCC since GCC 11 (C++ Standards Support in GCC).
With another project and toolchain I once got nasty to track down bugs when bumping the C++ standard beyond the manufacturer's default so I'm wary to do this. What are the community's experiences using C++ standards beyond C++14?
What is the general policy of ST regarding bumps of the default C++ standard version?
Best,
Markus
PS: I tried the CMake-based toolchain too, which in my case did not set a C++ standard explicitly, so going with my local compiler's (GCC15 C++17) default. As much as I prefer CMake - and appretiate the ongoing move to it - in general I would prefer to stay with the tried-and-tested STM32CubeIDE.
2026-01-15 3:26 AM
There's a (not very user-friendly) list of the differences here.
You're unlikely to run into any issues moving from C++14 to C++17, but there are some things that may cause changes in behaviour - for example, some orders of evaluation are now specified where they weren't previously (so instances of undefined-behaviour may be highlighted).
As will all changes, best thing is to have regression testing in place so that a "before" and "after" comparison can be made.
2026-01-15 3:33 AM
Thank you @CTapp.1 for your reply (and the link to the changes page - this is actually pretty neat).
My main issue are not so much the language and its behaviour and features - although that matters a great deal of course - but the toolchain. Long time ago I was an early adopter of "Modern C++" and bumped the C++ standard version beyond what the manufacturer defaulted to. I got tons of weird bugs (even messed up stacks) which cost me plenty of time and went away when I switched the project back to C++03.
I really would like to use at least C++17, but I don't want to repeat my past experience:-D
2026-01-15 4:12 AM
There were a lot of changes between C++03 and C++14 - I tend to treat them as different languages to try to avoid having to switch ;)