-
Notifications
You must be signed in to change notification settings - Fork 14.5k
Open
Labels
c++extension:clanglibc++libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.
Description
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.
Metadata
Metadata
Assignees
Labels
c++extension:clanglibc++libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.