Login  Register

Conversion between Handles

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

Conversion between Handles

Luigi Ballabio-2
427 posts
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