boostorg / system

Boost.org system module
http://boost.org/libs/system
35 stars 86 forks source link

ambiguous overload for 'operator==' #61

Closed dimarusyy closed 2 years ago

dimarusyy commented 3 years ago

Applying is_error_code_enum for std::error_code emits compilation error: https://godbolt.org/z/hzEP9n

This is a regression since boost-1.65.

pdimov commented 3 years ago

An interesting technique.

At this point I think I can only suggest a workaround on your side: define operator==(boost::system::error_code e1, std::error_code e2) with your desired semantics.

Boost.System can define this overload, but it won't have the behavior you want because it will convert e1 to std::error_code, not e2 to boost::system::error_code, and this won't match the pre-1.66 behavior of the comparison.