|
From: DU V. DE V. F. G. P. <fra...@ca...> - 2007-05-18 15:42:09
|
>Is this the base class?=20 Yes=20 In this case, isValid_ should be protected and derived classes would = have to manage it.=20 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:=20 ->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=E7ois |