Commit 9fdfa6c645f0d1f1060e1a0f93f456314f992107 moved comparison operators from namespace into error_code as a friend functions. This made them invisible to name lookup from error_condition when error_code does not participate directly in the comparison.
As a result, comparing an error_condition to a boost::system::error_code enumeration does not work anymore. At the same time comparison with std::error_code enumerations works because these operators are declared as error_condition friends (the same problem stands with std::error_code vs error_condition enum though).
It looks like some forward declarations for comparison operators outside classes would allow for name lookup to work and will fix the issue, but I'm not sure where is the right place to put them.
Hello,
Commit 9fdfa6c645f0d1f1060e1a0f93f456314f992107 moved comparison operators from namespace into error_code as a friend functions. This made them invisible to name lookup from
error_condition
whenerror_code
does not participate directly in the comparison.As a result, comparing an
error_condition
to aboost::system::error_code
enumeration does not work anymore. At the same time comparison withstd::error_code
enumerations works because these operators are declared aserror_condition
friends (the same problem stands withstd::error_code
vserror_condition
enum though).Example: https://godbolt.org/z/5qbPesvnz
It looks like some forward declarations for comparison operators outside classes would allow for name lookup to work and will fix the issue, but I'm not sure where is the right place to put them.