/*============================================================================= Copyright (c) 2011-2016 Bolero MURAKAMI https://github.com/bolero-MURAKAMI/Sprout Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ #ifndef SPROUT_INTEGER_INTEGER_DIGITS_HPP #define SPROUT_INTEGER_INTEGER_DIGITS_HPP #include #include #include #include #include #include namespace sprout { namespace detail { template struct integer_digits_impl : public sprout::integral_constant< std::size_t, (CHAR_BIT * sizeof(IntType) - (sprout::is_signed::value ? 1 : 0)) * N / D + ((CHAR_BIT * sizeof(IntType) - (sprout::is_signed::value ? 1 : 0)) * N % D ? 1 : 0) > {}; } // namespace detail // // integer_digits // template struct integer_digits; template struct integer_digits : public sprout::detail::integer_digits_impl {}; template struct integer_digits : public sprout::detail::integer_digits_impl {}; template struct integer_digits : public sprout::detail::integer_digits_impl {}; template struct integer_digits : public sprout::detail::integer_digits_impl {}; template struct integer_digits : public sprout::detail::integer_digits_impl {}; template struct integer_digits : public sprout::detail::integer_digits_impl {}; template struct integer_digits : public sprout::detail::integer_digits_impl {}; template struct integer_digits : public sprout::detail::integer_digits_impl {}; template struct integer_digits : public sprout::detail::integer_digits_impl {}; template struct integer_digits : public sprout::detail::integer_digits_impl {}; template struct integer_digits : public sprout::detail::integer_digits_impl {}; template struct integer_digits : public sprout::detail::integer_digits_impl {}; template struct integer_digits : public sprout::detail::integer_digits_impl {}; template struct integer_digits : public sprout::detail::integer_digits_impl {}; template struct integer_digits : public sprout::detail::integer_digits_impl {}; } // namespace sprout #endif // #ifndef SPROUT_INTEGER_INTEGER_DIGITS_HPP