Technical requirements
To get the most out of this chapter, I strongly recommend using Compiler Explorer (https://godbolt.org/) as you read through the examples. Select GCC as your compiler for x86 architecture. This will allow you to see standard output and better observe the code’s behavior. As we are using modern C++, make sure to select C++23 standard, by adding -std=c++23 in the compiler options box.
Compiler Explorer makes it easy to try the code, tweak it, and immediately see how it affects the output and generated assembly code. The examples from this chapter are available on GitHub (https://github.com/PacktPublishing/Cpp-in-Embedded-Systems/tree/main/Chapter08).