No, the hosted std::string
and std::stringstream
would not be allowed. And if you are programmed on an embedded system, it's highly unlikely you would be using those constructs. Embedded systems rarely have need for the full standard library (especially something as bulky and slow as std::stringstream
) and everything that comes with it, including RTTI, exceptions, dynamic memory allocation, etc.
If you are using some type of STL, it's either going to be hand-written or targeted specifically towards embedded systems. And more likely than not, they'll use static memory allocators or some other strategy rather than dynamic allocation, unless you are writing an operating system kernel.
So, if you ask "Can I use std::stringstream" in an embedded system, you are already coming from a bad premise and should not be writing software for safety-critical devices.