Boost logo

Boost :

From: Jeremy Day (jeremy.day_at_[hidden])
Date: 2006-07-18 14:56:19

> Personally I would prefer it if handlers automatically got the same
> order as would be provided by overload resolution. It's almost always
> a mistake to write
> catch(Base&) { ... }
> catch(Derived&) { ... }

Surely it would be possible to reorder the type list that catcher uses
(which it gets from the exception handling class, such as
my_exception_handler) so that the order is always from most derived (such as
Derived&) to least derived (such as Base&). Is there an MPL algorithm
somewhere that will do that? I feel certain that I saw some code by Andrei
Alexandrescu that did something along those lines.


Boost list run by bdawes at, gregod at, cpdaniel at, john at