Conversion between Handles

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Conversion between Handles

Luigi Ballabio-2
Hi all,
        at the present time,

     Handle<CashFlow> c = ...;
     Handle<TermStructure> h = c;

will store in h a null pointer. h can be checked with h.isNull(), but in
general a failed conversion will bite one far from the point where it
actually happened (I just had to debug such a case, and it was not pretty).
I'd rather have the failed conversion throw immediately. Is it OK for
everybody?

Bye,
        Luigi