Boost logo

Boost :

From: Victor A. Wagner, Jr. (vawjr_at_[hidden])
Date: 2002-09-23 04:40:46

I understand, but it's a lot faster to do a "switch" on an int, than on a
const char* (another thing left out of the language)

At Monday 2002/09/23 02:18, you wrote:
> >it IS a shame that the committee saw fit to only include a what() method in
> >the standard exceptions... a single int in addition would have made a lot
> >of things easier, IMO.
>Perhaps. However, the general intent was to produce the lightest, most
>efficient objects possible. If the only data in an exception is a vtable
>pointer, then the exception object will typically be half the size of
>one that gratuitously includes an int as well. It's a trivial task to
>add an int to a derived type - impossible to remove one.
>Or did you mean that a virtual which()/why() method would have been
>Unsubscribe & other changes:

Victor A. Wagner Jr.
PGP RSA fingerprint = 4D20 EBF6 0101 B069 3817 8DBF C846 E47A
PGP D-H fingerprint = 98BC 65E3 1A19 43EC 3908 65B9 F755 E6F4 63BB 9D93
The five most dangerous words in the English language:
               "There oughta be a law"

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