Index: boost/test/floating_point_comparison.hpp =================================================================== --- boost/test/floating_point_comparison.hpp (revision 49167) +++ boost/test/floating_point_comparison.hpp (working copy) @@ -200,10 +200,12 @@ // Public typedefs typedef bool result_type; + check_is_close_t() { } + template bool operator()( FPT left, FPT right, percent_tolerance_t tolerance, - floating_point_comparison_type fpc_type = FPC_STRONG ) + floating_point_comparison_type fpc_type = FPC_STRONG ) const { close_at_tolerance pred( tolerance, fpc_type ); @@ -212,7 +214,7 @@ template bool operator()( FPT left, FPT right, fraction_tolerance_t tolerance, - floating_point_comparison_type fpc_type = FPC_STRONG ) + floating_point_comparison_type fpc_type = FPC_STRONG ) const { close_at_tolerance pred( tolerance, fpc_type ); @@ -221,7 +223,7 @@ }; namespace { -check_is_close_t check_is_close; +check_is_close_t const check_is_close; } //____________________________________________________________________________// @@ -234,16 +236,18 @@ // Public typedefs typedef bool result_type; + check_is_small_t() { } + template bool - operator()( FPT fpv, FPT tolerance ) + operator()( FPT fpv, FPT tolerance ) const { return tt_detail::fpt_abs( fpv ) < tt_detail::fpt_abs( tolerance ); } }; namespace { -check_is_small_t check_is_small; +check_is_small_t const check_is_small; } //____________________________________________________________________________//