Pages: [1]   Go Down
Author Topic: C++ Standard Template Library (STL) with iostreams  (Read 3523 times)
0 Members and 1 Guest are viewing this topic.
Essex, UK
Offline Offline
Full Member
***
Karma: 4
Posts: 150
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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  smiley-wink
Logged

Home of the Nokia QVGA TFT LCD hacks: http://andybrown.me.uk

Pages: [1]   Go Up
Jump to: