2018-01-22 23:31 GMT+01:00 Gavin Lambert via Boost
On 23/01/2018 03:53, Niall Douglas wrote:
My recommendation would be not to provide comparison operators if either
`T` or `EC` does not provide them.
Agreed. Logged to https://github.com/ned14/outcome/issues/107
I assume this would be individually for each case?
There is still benefit in providing operator==(EC) even if T does not provide operator==, eg. for the construct:
if (outcome == make_error_code(xxx))
(not sure if this is the exact spelling, but it's something like this)
Especially in generic code templated on T. The alternative is much more wordy and not really any clearer.
This could be handled by providing a dedicated heterogeneous comparison
between `result