Boost logo

Boost :

From: Emil Dotchevski (emil_at_[hidden])
Date: 2008-05-02 13:36:35

On 5/2/08, Peter Dimov <pdimov_at_[hidden]> wrote:
> Neal Becker:
> This is (pedantically speaking) a bug in the new throw_exception (it doesn't
> allow throwing non-class types) that exposes a bug in the serialization
> library (it throws the invalid_class_name enum value directly instead of
> constructing an archive_exception from it).

The throw_exception() function template now throws an exception of
type that derives the type used to instantiate it, and this doesn't
work for non-class types. I admit that I completely missed this case.

My recommendation is to change the throw_exception() documentation to
specify that it must be used with objects of user-defined types. The
alternative solution is to fix the "bug" in throw_exception() and
allow non-class types, but that would disable the exception_ptr
functionality for these exceptions (on platforms without compiler
support for it.)

Emil Dotchevski
Reverge Studios, Inc.

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