"Eugene Lazutkin" <[EMAIL PROTECTED]> wrote: >Inline. > >"John Madsen" <[EMAIL PROTECTED]> wrote in message >news:[EMAIL PROTECTED] >> >> If you can convince most of the people on this list to provide an >automatic >> conversion, more power to you. I still maintain that avoiding hard to >diagnose >> errors is worth much more than saving 6 characters of typing. > >I am not trying to convince anybody in overall goodness of automatic >conversion. :-) I am asking question, which is still ignored: what "hard to >diagnose errors" do you envision for smart handles??? Reference to some >dogma would suffice too. ;-) > >> For a discussion of why user defined conversions are a bad idea (not >always, >> but most of the time), see More Effective C++, Item 5. > >I've read it when it was printed. I know author's reasons. And I agree with >most of them. The question is: how do they apply in _this particular case_? >
I am not ignoring the question. The point is that it is hard to guess what errors might occur. I did reference some dogma as well. I take Meyers' point to be that automatic conversions can sometimes produce surprising effects. Those effects may result in code that does something other than what it appears to do. Thus, *unless there is a very good reason*, avoid automatic conversions. That is what I did. Your reason for including them, i.e., avoiding typing, does not strike me as a good one. John P.S. Of course, if you want Scott Meyers on your side in this one, just look at Item 9 in the same book, where he does exactly what you're suggesting :-). Against his own better judgment IMHO. _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost