-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed
Labels
Description
Seems like it should convert to popcount(x) == 1 if it's available on the target arch, but looking at the code, doesn't seem like compiler would do it:
_NODISCARD constexpr bool has_single_bit(const _Ty _Val) noexcept {
return _Val != 0 && (_Val & (_Val - 1)) == 0;
}Line 87 in f2a2933
| return _Val != 0 && (_Val & (_Val - 1)) == 0; |