1
0
Fork 0
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:
bolero-MURAKAMI 2014-04-13 17:48:24 +09:00
parent fb69a146dd
commit 3e4dd5de00
3 changed files with 125 additions and 39 deletions

View file

@ -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