
AMDG Vladimir Batov wrote:
vicente.botet <vicente.botet <at> wanadoo.fr> writes:
class Foo { ... operator safebool::unspecified_bool_type() const { return safebool(my_condition); } };
For users' sake I'd like to stay within the mainstream vocabulary. Like type, value, result, etc. Indeed, for an initiated person the "unspecified_bool_type" looks familiar. However, I still remember the what-the... feeling when I came across it first time.
I like it anyway,
Glad to hear I am not alone.
I've written this far too many times, so I also would appreciate a common solution. I think it would be more straightforward to use a namespace scope typedef and a free function rather than a class, though. typedef ... safe_bool; safe_bool make_safe_bool(bool); In Christ, Steven Watanabe