Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2001-10-17 06:36:08

From: "Kevlin Henney" <kevlin_at_[hidden]>
> I think this is an excellent suggestion. What are Booster preferences
> from the following possibilities:
> (1) Add specific throws:
> (a) Not at all.
> (b) Distinguished by initialiser string.
> (c) Distinguished by enum.
> (d) Both (b) and (c).

I strongly suggest

(e) distinguished by exception type.

Init strings are useless in general (for nontrivial applications) - you've
no control over them and, for some parts of the world, they are in the wrong
language. :-)

> (2) Add type information details:
> (a) Not at all.
> (b) In exception result string.
> (c) As attributes to represent the type_info of the source and target.
> (d) Both (b) and (c).

(c). (d) is fine, but see above.

BTW, what happened with the idea to specialize lexical_cast for string ->
string, string -> X, X -> string? What about wchar_t overloads? I currently
need from_string and to_string conversions and the plain lexical_cast<>
doesn't really work well (if at all.)

Peter Dimov
Multi Media Ltd.

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