Ticket #2390: floating_point_comparison.hpp.2.diff

File floating_point_comparison.hpp.2.diff, 1.2 KB (added by Jürgen Hunold, 14 years ago)

Patch to add missing const qualifiers

  • boost/test/floating_point_comparison.hpp

     
    205205    template<typename FPT, typename ToleranceBaseType>
    206206    bool
    207207    operator()( FPT left, FPT right, percent_tolerance_t<ToleranceBaseType> tolerance,
    208                 floating_point_comparison_type fpc_type = FPC_STRONG )
     208                floating_point_comparison_type fpc_type = FPC_STRONG ) const
    209209    {
    210210        close_at_tolerance<FPT> pred( tolerance, fpc_type );
    211211
     
    214214    template<typename FPT, typename ToleranceBaseType>
    215215    bool
    216216    operator()( FPT left, FPT right, fraction_tolerance_t<ToleranceBaseType> tolerance,
    217                 floating_point_comparison_type fpc_type = FPC_STRONG )
     217                floating_point_comparison_type fpc_type = FPC_STRONG ) const
    218218    {
    219219        close_at_tolerance<FPT> pred( tolerance, fpc_type );
    220220
     
    238238
    239239    template<typename FPT>
    240240    bool
    241     operator()( FPT fpv, FPT tolerance )
     241    operator()( FPT fpv, FPT tolerance ) const
    242242    {
    243243        return tt_detail::fpt_abs( fpv ) < tt_detail::fpt_abs( tolerance );
    244244    }