Go Down

Topic: C++ Standard Template Library (STL) with iostreams (Read 3871 times) previous topic - next topic

Andy Brown

I ported the original SGI standard template library (STL) with some stream support from libstdc++ to AVR during a few free days over the festive period:

http://andybrown.me.uk/ws/2011/01/15/the-standard-template-library-stl-for-avr-with-c-streams/

Basically you get:


  • All containers. The limited memory on the AVR platform will make it hard to find practical uses for the associative containers backed by the rb-tree structure (set, multiset, hash_set, hash_multiset, map, multimap, hash_map, hash_multimap etc.). However vector (especially the efficient specialisation vector<bool>), string, bitset, list are all perfectly viable in practice.
  • All algorithms and functions. Sorting, searching, iterating et. al.
  • iostreams backed by strings, iterators, hardware serial and the LiquidCrystal character LCD display. i.e. << and >> stream operators on to these devices.


Have fun, but keep an eye on your memory usage  ;)
Home of the Nokia QVGA TFT LCD hacks: http://andybrown.me.uk

Go Up