Posted by
Luigi Ballabio on
URL: http://quantlib.414.s1.nabble.com/reference-of-boost-shared-ptr-instead-of-Handle-tp7623p7626.html
On Fri, 2009-08-28 at 14:06 +1000, Yan Kuang wrote:
> I thought this paragraph implies Handle class is designed to replace
> smart pointer to smart pointer.
> While I thought we never needed a smart pointer to smart pointer, we
> should use the reference passing instead.
If you just want to be able to perturb an object and have the containing
object see the change, the shared_ptr is enough. Classes in the library
use a Handle so that, beside modifying it, one can also replace the
contained object altogether and have the containing object see the new
one.
Luigi
--
Skinner's Constant (or Flannagan's Finagling Factor):
That quantity which, when multiplied by, divided by, added to,
or subtracted from the answer you got, gives you the answer you
should have gotten.
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.
http://p.sf.net/sfu/bobj-july_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users