[uClinux-dev] C++ exceptions, STLPort?

Gavin Lambert gavinl at compacsort.com
Thu Oct 4 17:22:09 EDT 2007


Quoth Stanislav Meduna:
> Actually what I need are the basic classes such as
> vector or list - I don't need the exception support
> as I found the exception handling too heavyweight
> and error-prone in an embedded world - however, the
> STL itself uses exceptions.

uClibc++ supports disabling exceptions -- but replaces them with a call to
abort(), which is even more heavy-weight :)  But if you're sure you'll never
hit an exception path, then you may want to have a look at that.

Be aware though that some of its container class implementations don't quite
follow the C++ standard, since they sometimes sacrifice compatibility for
size.  (The most common one is that remove methods sometimes invalidate
iterators when the standard says they won't, since the collection is
implemented in terms of a more restrictive class instead of having its own
separate implementation.)




More information about the uClinux-dev mailing list