16 Jan
2018
16 Jan
'18
1:38 a.m.
On 16/01/2018 10:18, Niall Douglas wrote:
To summarise what the mock up demonstrates:
1. error_category() gains a new virtual function called `bool failure(int code)` which is now called by error_code's operator bool.
As I hinted in another post but didn't quite actually state, rather than adding a new method, wouldn't it be sufficient to make operator bool do something like: return *this == error_condition(0, generic_category()); (Using generic_category() is more correct, but given the default constructor it might perhaps lead to less/zero code breakage to use system_category() instead.)