Can I use the STL <list> and <iterator> libraries with the mbed framework?

I am getting some weird behaviour using the iterator objects. I wrote a bunch of tests to ensure my logic was sound but since the tests are running on my mac book and not my target MCU (stm32f401re) I am starting to think the compiler is doing some c++ things?

So simple question:

Can I use the std::list library and the std::iterator with the mbed framework?


I thing, yes, because c++ standard library come with compiler, as I remember.
You can check this page, copy & paste example and on top just add #include "mbed.h"

BR, Jan

so they are not available when just including #include <mbed.h>, I needed to additionally include <list> and <iterator>. Does that mean… what does that mean? The code compiles with no errors or warnings so :man_shrugging:

yes, you need add #include <list> but <iterator> is not necessary I think, because the iterator will probably come together with the list thank to inheritance.

Br, Jan