Ticket #2390: float_comparison_unused.patch
File float_comparison_unused.patch, 1.8 KB (added by , 14 years ago) |
---|
-
boost/test/floating_point_comparison.hpp
200 200 // Public typedefs 201 201 typedef bool result_type; 202 202 203 check_is_close_t() { } 204 203 205 template<typename FPT, typename ToleranceBaseType> 204 206 bool 205 207 operator()( FPT left, FPT right, percent_tolerance_t<ToleranceBaseType> tolerance, 206 floating_point_comparison_type fpc_type = FPC_STRONG ) 208 floating_point_comparison_type fpc_type = FPC_STRONG ) const 207 209 { 208 210 close_at_tolerance<FPT> pred( tolerance, fpc_type ); 209 211 … … 212 214 template<typename FPT, typename ToleranceBaseType> 213 215 bool 214 216 operator()( FPT left, FPT right, fraction_tolerance_t<ToleranceBaseType> tolerance, 215 floating_point_comparison_type fpc_type = FPC_STRONG ) 217 floating_point_comparison_type fpc_type = FPC_STRONG ) const 216 218 { 217 219 close_at_tolerance<FPT> pred( tolerance, fpc_type ); 218 220 … … 221 223 }; 222 224 223 225 namespace { 224 check_is_close_t c heck_is_close;226 check_is_close_t const check_is_close; 225 227 } 226 228 227 229 //____________________________________________________________________________// … … 234 236 // Public typedefs 235 237 typedef bool result_type; 236 238 239 check_is_small_t() { } 240 237 241 template<typename FPT> 238 242 bool 239 operator()( FPT fpv, FPT tolerance ) 243 operator()( FPT fpv, FPT tolerance ) const 240 244 { 241 245 return tt_detail::fpt_abs( fpv ) < tt_detail::fpt_abs( tolerance ); 242 246 } 243 247 }; 244 248 245 249 namespace { 246 check_is_small_t c heck_is_small;250 check_is_small_t const check_is_small; 247 251 } 248 252 249 253 //____________________________________________________________________________//