4 ms·
1. Isn't std inadequate in "embedded" programming?
by lvass 4y ago
1. Isn't std inadequate in "embedded" programming?
- tialaramex 4y agoIn principle the C++ standard does define a subset of its standard library which is available in Freestanding environments (ie without an operating system). In practice what is actually available and whether it works satisfactorily varies considerably more than for the hosted environments. Almost everything is up for grabs and so you probably can't rely on the standard much. Your compiler vendor probably couldn't care less what the standard says anyway.
- colanderman 4y agoDepends on what's you're targeting, but if you're coding for say, AVRs, you're not using C++, but rather C, in which case `unreachable` is your friend. [1] [1] https://en.cppreference.com/w/c/program/unreachable https://en.cppreference.com/w/c/program/unreachable
- pjmlp 4y agoIn some cases not even C, just a tiny subset full of chip vendor extensions.
- SubjectToChange 4y agoA lot of it, sure. But there are a lot of header only types which do not dynamically allocate memory on their own. For instance <algorithm>, <atomic>, <bitset>, <limits>, <iterator>, <type_traits>, etc.