
1 Apr
2009
1 Apr
'09
2:10 a.m.
Hi, On Wed, Apr 1, 2009 at 6:20 AM, Vladimir Batov <vladimir.batov@wrsa.com.au>wrote:
I glanced over "explicit conversion operators" in C++0x. It did not struck me as relevant to safe_bool. Care to elaborate?
It is relevant since you can say, define an explicit conversion function to convert to bool, and yet avoid the very problems with say, also allowing implicit conversion to int, that the safe bool idiom is used to avoid. In other words, it is a language feature directly designed to replace the safe bool idiom, and more. Regards, Eugene Wee