From: Tobias Schwinger (tschwinger_at_[hidden])
Date: 2007-10-06 07:45:04
Peter Dimov wrote:
> Tobias Schwinger wrote:
>> This approach provides better integration. But we're back in
>> boilerplate land (as you showed earlier in this thread).
> Boilerplate compared to what? You have to keep in mind where we're coming
<snip code: good old exception class>
> Switching to boost::exception actually removes most of the boilerplate code
> (at the expense of some memory allocations).
Actually I was comparing
base,tag_a,tag_b /*...*/> my_exception;
class my_exception : base
my_exception(a_t const& a, b_t const& b /*...*/)
(*this) << boost::error_info<tag_a>(a)
Of course, both variants have the potential to remove quite a lot of
boilerplate from traditional exception code.
> The dynamic allocation problem
> can likely be addressed by adding an allocator argument to boost::exception.
Yes, but adding allocator support shouldn't be substitute for
considering a more economic data structure (e.g. a single-linked list),
Peter, is there any chance for you to find the time to write a full review?
- Review Manager -
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk