Original comment by /u/hak8or
For others looking into this topic, I highlybsuggest this cppcon talk. He goes over making a c++ based project on a small embedded system while having the assembly output on the side.
As he adds functionality, he talks about how the compiler optimizes away everything, while showing the assembly output as proof. I highly suggest it, and often point people to it who are still stuck in the grossly outdated mindset of c++ having no place in embedded.
It's also an amazing way to filter out candidates who claim to know how to do software development on embedded, when in actuality they are set in their old ways and don't keep up with the field in general.