Re: shared_ptr in Error class
Posted by
Luigi Ballabio on
Apr 09, 2011; 11:23am
URL: http://quantlib.414.s1.nabble.com/shared-ptr-in-Error-class-tp13384p13385.html
On Apr 9, 2011, at 11:16 AM, Kakhkhor Abdijalilov wrote:
> Any particular reason to use boost:shared_ptr to store the error
> message. Just curious.
It was to avoid copying strings when exceptions are passed. Not for
performance reasons, but rather to make it less likely that copying an
exception raises another one. It would not be likely, but it cost
little to use the pointer instead.
Luigi
------------------------------------------------------------------------------
Xperia(TM) PLAY
It's a major breakthrough. An authentic gaming
smartphone on the nation's most reliable network.
And it wants your games.
http://p.sf.net/sfu/verizon-sfdev_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev