
At Monday 2004-02-09 23:33, you wrote:
David Abrahams wrote:
"Brock Peabody" <brock.peabody@npcinternational.com> writes:
-----Original Message----- From: boost-bounces@lists.boost.org [mailto:boost-bounces@lists.boost.org] On Behalf Of Victor A. Wagner, Jr.
We can either do nothing (until the standard changes so we can handle ALL types) or we can do something (handle the built-in types and the standard exceptions).
I suggest "something" as a useful approach.
I'd suggest allowing the user to specify a typelist rather than hard coding the standard types. You could supply as a default the list of standard types.
There are better ways. Boost.Python uses a dynamic registration technique. Compile-time enumeration of the exceptions is overkill and not sufficiently flexible.
Isn't there a problem with ordering in hierarchies when using dynamic registration?
register_exception<std::exception>(); register_exception<my_exception>();
vs
register_exception<my_exception>(); register_exception<std::exception>();
AFAICT there is no way to determine the most derived type. Maybe this isn't a problem in practice..
that was the algorithm that I thought I'd remembered from Alexandrescu's tome. I have a meeting in a few minutes, I'll try to look it up when I return.
-- Daniel Wallin _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Victor A. Wagner Jr. http://rudbek.com The five most dangerous words in the English language: "There oughta be a law"