|
Boost : |
From: Emil Dotchevski (emil_at_[hidden])
Date: 2007-10-02 22:57:08
> >>> Integration in Boost is even easier, as it can be done in a single
> >>> place, in the boost::throw_exception function.
> >> While technically possible, this measure requires the authors of
> >> throwing libraries to reach consensus that it should happen - and a
> >> single developer with objections might blow that plan.
> >
> > It is my understanding that calling boost::throw_exception when
> > throwing an exception is a requirement, not a guideline.
> >
> > The price of the proposed use of enable_error_info in
> > boost::throw_exception is one empty shared_ptr. In terms of space,
> > this amounts to the size of two pointers added to all exception
> > objects. Do you think that this would be a problem?
> >
>
> It also forces a dependency on boost::shared_ptr for all libraries that
> use boost::throw_exception. boost::shared_ptr in turn has its own
> dependencies.
>
> Although some work seems to have been done on shared_ptr since 1.34.
>
> It appears to no longer have a dependency on rtti which was a show
> stopper for me before. I must have missed when this happened if it was
> announced.
Right.
If the dependency on shared_ptr is problematic, it can be removed as
it is strictly an implementation detail. This will also reduce the
footprint of class exception to the size of a single pointer.
Emil Dotchevski.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk