Invalid conversions and error messages.

Christian Bauer cbauer at
Sat Jan 19 03:08:24 CET 2002


On Fri, Jan 18, 2002 at 04:11:39PM -0600, Bob McElrath wrote:
> But GiNaC should probably throw an exception for
> the invalid conversion of "a" to a numeric.

The documented behavior of ex_to<> is to have an undefined result if the
expression is not of the specified type. If necessary, you have to check
this with is_a<> or is_exactly_a<> first.


  / Coding on PowerPC and proud of it

More information about the GiNaC-list mailing list