Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2003-10-11 11:36:30


Alexander Terekhov wrote:
> Alexander Terekhov wrote:
> [...]
>>> throw() specs have a "required stack frame" cost.
>>
>> It might be better to burden the callers, I think. Consider:
>
> That way, if all your code is throw()-nothing (and you don't have
> any try/catch... why would you?), you'll basically get "plain old
> C quality" executable without ANY exception handling related costs
> whatsoever. So, your assertion that throw() specs (in the two-phase
> EH world without unwinding on ES violations) have a "required stack
> frame" cost is probably false... unless I am just missing and/or
> misunderstanding something, of course.

You can't have it both ways. Either stack overflow et al are C++ exceptions
and everything can throw, hence stack frames are always required, or throw()
specs have no cost if static analysis can prove the code doesn't throw. Pick
one. :-)


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