diff --git a/include/boost/unordered/detail/foa/core.hpp b/include/boost/unordered/detail/foa/core.hpp index fab35866..38d50e68 100644 --- a/include/boost/unordered/detail/foa/core.hpp +++ b/include/boost/unordered/detail/foa/core.hpp @@ -923,6 +923,8 @@ inline unsigned int unchecked_countr_zero(int x) unsigned long r; _BitScanForward(&r,(unsigned long)x); return (unsigned int)r; +#elif defined(BOOST_GCC)||defined(BOOST_CLANG) + return (unsigned int)__builtin_ctz((unsigned int)x); #else BOOST_UNORDERED_ASSUME(x!=0); return (unsigned int)boost::core::countr_zero((unsigned int)x);