mirror of
https://github.com/bolero-MURAKAMI/Sprout
synced 2025-08-03 12:49:50 +00:00
fix ctz/clz bitwise operation implementation
This commit is contained in:
parent
fb69a146dd
commit
3e4dd5de00
3 changed files with 125 additions and 39 deletions
|
@ -30,7 +30,7 @@ namespace sprout {
|
|||
# endif
|
||||
template<typename Integral>
|
||||
inline SPROUT_CONSTEXPR int
|
||||
clrsb(Integral x) {
|
||||
clrsb(Integral x) SPROUT_NOEXCEPT {
|
||||
return sprout::clz(~x);
|
||||
}
|
||||
} // namespace detail
|
||||
|
@ -42,7 +42,7 @@ namespace sprout {
|
|||
std::is_integral<Integral>::value,
|
||||
int
|
||||
>::type
|
||||
clrsb(Integral x) {
|
||||
clrsb(Integral x) SPROUT_NOEXCEPT {
|
||||
return sprout::detail::clrsb(x);
|
||||
}
|
||||
} // namespace sprout
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue