Skip to content

test_error_code_failure_condition test case fails. #61

@PacificViking

Description

@PacificViking

Bug

The line REQUIRE((failure_error_code == failure_condition)); in the test_error_code_failure_condition test case fails (on my machine only). This passes the test cases.

This is because on my machine, the ErrorCategory::equivalent(int, std::error_condition) calls the un-specialized ErrorCategory::equivalent(ErrorCodeEnum, std::error_condition) instead of the desired BinaryErrorCategory::equivalent. This behavior is not reproduced with the GitHub actions unit tests, which call the correct specialization, nor on my virtual machine.

ystdlib-cpp version

d3fc980

Environment

NixOS 24.11. g++ 14.2.1 under a flake dev shell.

Reproduction steps

I am unsure about what parts of my environment caused this unique error. I was only able to fix it by implementing error_category::equivalent with an int instead of BinaryErrorCodeEnum.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions