Our great sponsors
-
libhal
A collection of interfaces and abstractions for embedded peripherals and devices using modern C++
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
You can check an example approach for embedded in this project. It has very rich documentation and design decisions. As said the big question is heap usage an not the vector per se.
It used to be undefined behaviour for all types, even trivial builtin types like int, until some change in 2020, because it wouldn't start their lifetime, but they have fixed this now, afaik even retroactively for C++17: https://github.com/cplusplus/draft/pull/3765