Skip to content

Bug in C++ standard library header <bit> #55491

@Delta-dev-99

Description

@Delta-dev-99

__t = __rotr(__t, __ulldigits);

The rotation direction there seems wrong
Left rotation makes sense, because it moves the most-significant-bits block (of same size as unsigned long long) to the least significant positions (it wraps around), where you can apply the usual function to that fragment of the value, by interpreting it as unsigned long long.

I would have fixed the issue myself (I would love to be included in the list of contributors) but I found the process to be too complicated.
The change is merely one character. Why not accept pull requests for this kind of changes?
So, I decided to at least open an issue so you can fix it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    libc++libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions