Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2001-04-14 09:42:43


From: "David Abrahams" <abrahams_at_[hidden]>

> From: "Peter Dimov" <pdimov_at_[hidden]>

> > In short, I'm saying that we should have two BOOST_PRECONDITIONs, one
for
> > situations where it's likely to have a performance impact in release,
and
> > one for places where it can safely be left on, even in high-perf code.
> >
> > I see scoped_ptr::operator*() as an example of a 'costly' check and
> > function::operator()() as a 'free' check.
>
> Even "free" checks cost code space (and some speed), for which embedded
> programmers may not be willing to pay.

Yes, in theory. However RTTI, for instance, does cost quite a lot more space
(many console game programmers never enable it - and some even disable
exceptions) and boost libraries don't exactly try to accommodate their point
of view.

Anyway, I think that the basic idea of having two separately-configurable
precondition macros is sound.

--
Peter Dimov
Multi Media Ltd.

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