Ticket #5158: lowest_bit.patch
File lowest_bit.patch, 667 bytes (added by , 12 years ago) |
---|
-
boost/pending/lowest_bit.hpp
32 32 33 33 } 34 34 35 template<> 36 inline int lowest_bit(unsigned int x) { 37 assert(x >= 1); // PRE 35 38 39 return __builtin_ctz( x ); 40 } 41 42 template<> 43 inline int lowest_bit(unsigned long x) { 44 assert(x >= 1); // PRE 45 46 return __builtin_ctzl( x ); 47 } 48 49 template<> 50 inline int lowest_bit(unsigned long long x) { 51 assert(x >= 1); // PRE 52 53 return __builtin_ctzll( x ); 54 } 36 55 } 37 56 38 57