Issue 130584
Summary Parts of std::numeric_limits<_BitInt(N)> broken
Labels new issue
Assignees
Reporter QrczakMK
    `std::numeric_limits<_BitInt(N)>::digits` and `std::numeric_limits<unsigned _BitInt(N)>::digits` use `sizeof` to infer the range, and thus yield incorrect results if there are padding bits.

This causes `std::numeric_limits<_BitInt(N)>::min()` and `max()` to fail the build if there are padding bits, because they try to `constexpr`-compute a value which does not fit in the type.

Demo: https://godbolt.org/z/4bbb6YaPa
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to