From c20ed80ef49dbd8c78188dc2bbe52cdc47b22955 Mon Sep 17 00:00:00 2001 From: King_DuckZ Date: Thu, 13 Apr 2017 08:58:24 +0100 Subject: [PATCH] Yet another possible fix for the rpi build --- include/duckhandy/lexical_cast.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/duckhandy/lexical_cast.hpp b/include/duckhandy/lexical_cast.hpp index a8d8e34..3ad1877 100644 --- a/include/duckhandy/lexical_cast.hpp +++ b/include/duckhandy/lexical_cast.hpp @@ -168,7 +168,7 @@ namespace dhandy { std::size_t dec::count_digits_implem (T parValue, dhandy::bt::index_seq, dhandy::bt::index_seq) { typedef typename std::make_unsigned::type UT; static constexpr UT powers[] = { 0, static_cast(dhandy::implem::power<10, Powers + 1>::value)... }; - static constexpr std::size_t maxdigits[] = { count_digits_bt(static_cast(sprout::pow(2.0, Digits))) - (std::numeric_limits::is_signed ? 1 : 0)... }; + static constexpr std::size_t maxdigits[] = { count_digits_bt(static_cast(sprout::pow(2.0, Digits))) - (std::numeric_limits::is_signed ? 1 : 0)... }; const auto bits = sizeof(parValue) * CHAR_BIT - dhandy::implem::count_leading_zeroes(dhandy::implem::abs(parValue)); static_assert(std::is_same::value, "Unexpected type"); return (dhandy::implem::abs(parValue) < powers[maxdigits[bits] - 1] ? maxdigits[bits] - 1 : maxdigits[bits]) + dhandy::implem::is_negative::check(parValue);