#ifndef BOOST_INTEGER_INTEGER_LOG2_HPP
#define BOOST_INTEGER_INTEGER_LOG2_HPP
-#include <assert.h>
-#ifdef __BORLANDC__
-#include <climits>
-#endif
#include <boost/limits.hpp>
#include <boost/config.hpp>
+#include <boost/assert.hpp>
+#if defined(BOOST_BORLANDC)
+#include <climits>
+#endif
namespace boost {
template <typename T>
struct width {
-#ifdef __BORLANDC__
+#ifdef BOOST_BORLANDC
BOOST_STATIC_CONSTANT(int, value = sizeof(T) * CHAR_BIT);
#else
BOOST_STATIC_CONSTANT(int, value = (std::numeric_limits<T>::digits));
template <typename T>
int integer_log2(T x) {
- assert(x > 0);
+ BOOST_ASSERT(x > 0);
const int n = detail::max_pow2_less<
detail::width<T> :: value, 4