28 Jul
2013
28 Jul
'13
11:13 a.m.
2013/7/28 Ahmed Charles
So bool b = t; // I wish it worked with Testable::explicit operator bool, but doesn't.
Sorry for bringing up such an old thread, but what's wrong with writing:
bool b(t);
Which does the same thing?
Obviously needing to fix old code, that uses the former syntax ;-) And by the way, the use case I'll miss the most is: bool f() { shared_ptr<T> p = something(); some_other_things(); return p; } The last line will need to be changed somethink like: return !!p; It's no big deal, but I'll personally miss the old syntax ;-) Regards, Kris