boostorg / boostorg/system

operator==( error_code, error_code ) is suboptimal

Open
#106 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
45
Forks
96
PR merge metrics
No merged PRs in 30d

Description

There's room for improvement both when the RHS is unknown (https://godbolt.org/z/sK3G6j3e6) and when it's known (https://godbolt.org/z/6M9qd4dqa). (GCC does best here; Clang is even worse.)

Fixing this would probably require switching from `interop_category` to `unknown_category` (and retaining the original code value) as mentioned in #95. Also, the
```
bool s1 = lhs.lc_flags_ == 1;
bool s2 = rhs.lc_flags_ == 1;
```
logic should probably be changed to an explicit `if` tree.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.