id summary reporter owner description type status milestone component version severity resolution keywords cc 12261 LT_HalfPrevLoT and GT_HalfSuccHiT are not symmetrical Christophe Brassart Fernando Cacciola "Reusing low boost conversion policies to implement my own roundToInt method... If you try the following code: {{{ template struct NumericRangeCheckerTraits { typedef To target_type; typedef From source_type; typedef From argument_type; }; struct ToTextOverflowHandlerPolicy { void operator() ( boost::numeric::range_check_result result) { switch (result) { case boost::numeric::cInRange: std::cout << ""the value is in range""<< std::endl; break; case boost::numeric::cNegOverflow: case boost::numeric::cPosOverflow: std::cout << ""the value is out of range""<< std::endl; break; } }; }; double dmax = std::numeric_limits::max() + 0.5; double dmin = std::numeric_limits::min() - 0.5; boost::numeric::convdetail::generic_range_checker, boost::numeric::convdetail::LT_HalfPrevLoT>, boost::numeric::convdetail::GT_HalfSuccHiT>, ToTextOverflowHandlerPolicy>::validate_range(dmax); boost::numeric::convdetail::generic_range_checker, boost::numeric::convdetail::LT_HalfPrevLoT>, boost::numeric::convdetail::GT_HalfSuccHiT>, ToTextOverflowHandlerPolicy>::validate_range(dmin); }}} You will get: {{{ the value is out of range the value is in range }}} When they should be both out of range. This is because GT_HalfSuccHiT should implement range_check_result as such: {{{ static range_check_result apply ( argument_type s ) { return s > static_cast(bounds::highest()) + static_cast(0.5) ? cPosOverflow : cInRange ; }}} instead of using >=. The comment to describe GT_HalfSuccHiT should be changed as well to: {{{ // s > Highest(T) + 0.5 ? cPosgOverflow : cInRange }}} " Bugs new To Be Determined numeric Boost 1.61.0 Problem