Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2019-11-29 07:57:23


Andrzej Krzemienski wrote:

> On the other hand, if the goal is to provide a container suitable for
> embedded operations, where you cannot afford throwing exceptions the same
> way as you cannot afford heap allocation, one would expect the other
> model.

On embedded, you compile with -fno-exceptions and add

namespace boost
{
    void throw_exception( std::exception const& ) { __builtin_trap(); }
}

There's no need to afford exceptions, you just need to be able to afford the
potential loss in performance, basically one branch per append if not
heroically optimized away.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk