| 169 | |
| 170 | template <unsigned int BITS> |
| 171 | unsigned int base_uint<BITS>::bits() const |
| 172 | { |
| 173 | for (int pos = WIDTH - 1; pos >= 0; pos--) { |
| 174 | if (pn[pos]) { |
| 175 | for (int nbits = 31; nbits > 0; nbits--) { |
| 176 | if (pn[pos] & 1U << nbits) |
| 177 | return 32 * pos + nbits + 1; |
| 178 | } |
| 179 | return 32 * pos + 1; |
| 180 | } |
| 181 | } |
| 182 | return 0; |
| 183 | } |
| 184 | |
| 185 | // Explicit instantiations for base_uint<256> |
| 186 | template base_uint<256>::base_uint(const std::string&); |
no outgoing calls