Hello. I am writing code for embedded systems. Most cpu are ARM or SoftCpu from FPGA vendors. Up to now I use C11. All the CPU are supported by gcc, thank god. I used to write c++ before C++ 11. The good old time. I now think more and more often to switch to C++ on embedded. No exceptions no RTTI no STL or Boost. Just C with Classes for the luxury of C++. What do you think? Is it worth the hazel?
Isn't this the premise upon which Google's Pigweed (https://pigweed.dev/) operates?
Why not? Just stay away from anything that may allocate/free memory after system initialization, like "String".
I have a small experience with embedded systems but I once helped a team of hardware engineers switch from a "assembly-like code with loops and state machines" to C++17/20 on a very barebone platform and everyone was happy with the improvements in code quality and tools. IIRC we even used relatively advanced objects like `std::optional`. No need to shun the STL as it supposedly compiles to small code most of the time.