I am currently using Arduino IDE 2.3.2 to write C++ code. Although this does allow me to compile code using C++ standard library features like std::unique_ptr(and of course supports the base language features like uint8_t), it is missing support for significant portions of the standard library, such as std::vector, std::string, iterators, etc.
What do I need to do in order to be able to access the complete C++ standard library when using the Arduino IDE to target Arduino boards? Do I need to upgrade my IDE to a later version? Do I need to install a different toolchain? Do I need to switch to a different Arduino board that provides more capabilities?
The commands/instructions are what you get. Unless you want to get into developing the IDE ( which I guess you can do ?) that’s your lot .
But at the end of the day these are all standard processors widely used in industry . I’m sure all of industry doesn’t use the Arduino ide
There is Atmel Studio for the Atmel processors , Visual studio and so on .
Visual studio , I would think worth a look ( it is free)
You’ll probably find limitations with libraries , or using them .
Have a look at chip manufacturers specific development systems .
Arduino has an advantage that it supports many devices from different manufacturers and has extensive library and support .
You might find it easier to forget using those C commands of which you speak - there is always a work around . There may also be good reason ( maybe even historical( eg dynamic string length. - smacks of problems where memory is limited ) why they are not included .)
You might be able to write a library so you can use this stuff , but life is too short .
Btw 512kb of ram is tiny compared to typical desktops .
You can't, at least not supplied by Arduino. There are parts implemented by 3rd parties in various libraries though. The reason is anything that is memory hungry is not a good fit for Arduino. Even Strings are a problem, using them too much will usually end in a crash.
I find it amusing that us old timers who only know C are not impacted by this, maybe we need to add good old K&R C to the modern curiculum.
@horace Yes it is working!!! Then where did the information come from that they (vector, string, exception) do not exist, and that if they exist, they will be slow and will not work correctly? Or does the ESP32-S3 only have all this?
even though it is possible to run simple STL test programs on ESP32, RPI Pico etc they are still microcontrollers with limited RAM, i.e. NOT not PCs or even Raspberry Pi 4 with Gbytes of RAM and virtual memory operating systems
using STL vector, list, queue, etc can fragment the memory and cause problems
I would still tend to use C type arrays
That's a pretty nebulous question. The STL is written by highly-experienced programmers, is thoroughly-tested, and is nearly bulletproof when used per its documentation. I'm guessing you'd be hard pressed to implement something more "efficient" without going to assembly language ... which would not be nearly as flexible. What is your real concern?