id summary reporter owner description type status milestone component version severity resolution keywords cc 8970 Karma fails to output a sign with a user-defined real number policy alex.korobka@… Hartmut Kaiser "Snippet that shows the problem: #include \\ #include \\ using namespace boost::spirit; \\ template struct signed_policy : \\ karma::real_policies { static bool force_sign(Num n) { return true; } }; \\ int main() { \\ std::string s; \\ std::back_insert_iterator sink(s); \\ karma::generate(sink, karma::real_generator >(), \\ -0.123 ); std::cout << s << std::endl; \\ return 0; \\ } This prints "" 0.123"" instead of ""-0.123"". The problem is due to the recent argument change in integer_part() policy method. template \\ static bool integer_part (OutputIterator& sink, T n, bool sign, bool force_sign) { \\ return sign_inserter::call(sink, traits::test_zero(n), \\ sign, force_sign) && int_inserter<10>::call(sink, n); } Argument 'T n' previously used to hold the entire floating point value. Now it holds only the integer part, hence the test_zero(n) is not sufficient anymore when the actual value is in the range of (-1 : 0) or (0, -1). " Bugs closed To Be Determined spirit Boost 1.54.0 Regression fixed karma real