Re: a simple question
Posted by
DU VIGNAUD DE VILLEFORT FRANCOIS GASAPRD PHI on
URL: http://quantlib.414.s1.nabble.com/a-simple-question-tp9462p9463.html
>Is this the base class?
Yes
In this case, isValid_ should be protected and derived classes would have to manage it.
I agree with you, we could also leave it as it is and provide a protected function setQuote() which would set isValid_ to true.
>Using optional wouldn't be so tricky: we could just write SimpleQuote as >(without namespace boost)
I agree again, provided that you add a resetQuote() method to your class, then the use of optional would be transparent to the user. Still, I have two remaining arguments:
->You have to reimplement this machinery in every quote classe.
->What would be the added benefit compare to a more traditionnal solution ? (like mine)
I know that you will destroy these arguments in a couple of seconds, but it is instructive to understand one's error anyway
François
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev