Login  Register

Re: quantlib Handle compile error

Posted by Luigi Ballabio on May 24, 2010; 3:44pm
URL: http://quantlib.414.s1.nabble.com/quantlib-Handle-compile-error-tp7722p7736.html

On Mon, 2010-05-24 at 10:34 +0100, Simon Courtenage wrote:
> Sorry for asking what might be a silly question but if, in Handle<T>,  
> T must inherit from Observable, why is Handle a template class?

Because Handle must give access to the full interface of T, not only
what's in Observable.  If we stored a pointer to Observable, we'd have
to upcast all over the place.

Luigi


--

There are no rules of architecture for a castle in the clouds.
-- Gilbert K. Chesterton



------------------------------------------------------------------------------

_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users