Ticket #11168: 25098.patch

File 25098.patch, 1.8 KB (added by ingo.loehken@…, 8 years ago)

quickfix

  • ext/boost/1.57/inc/boost/date_time/time_duration.hpp

    # HG changeset patch
    # User iloehken
    # Date 1428227847 -7200
    #      Sun Apr 05 11:57:27 2015 +0200
    # Node ID c726bfb922cffbf217679aa77c3b77717deabf26
    # Parent  6222c2f9927f782a99d1c597f7f397153903c113
    [boost] fixed bug
    
    diff -r 6222c2f9927f -r c726bfb922cf ext/boost/1.57/inc/boost/date_time/time_duration.hpp
    a b  
    275275      "The base duration resolution must be a multiple of the subsecond duration resolution");
    276276    BOOST_STATIC_CONSTANT(boost::int64_t, adjustment_ratio = (traits_type::ticks_per_second >= frac_of_second ? traits_type::ticks_per_second / frac_of_second : frac_of_second / traits_type::ticks_per_second));
    277277
     278    //--------------------------------------------------------------------
     279    static inline impl_type InitBase(boost::int64_t const& ss)
     280    //--------------------------------------------------------------------
     281    {
     282      return impl_type(traits_type::ticks_per_second >= frac_of_second ? ss * adjustment_ratio : ss / adjustment_ratio);
     283    }
     284
    278285  public:
    279     explicit subsecond_duration(boost::int64_t ss) :
    280       base_duration(impl_type(traits_type::ticks_per_second >= frac_of_second ? ss * adjustment_ratio : ss / adjustment_ratio))
    281     {
    282     }
     286    //--------------------------------------------------------------------
     287    template <typename T>
     288    explicit subsecond_duration(T const& ss,
     289      typename boost::disable_if<boost::is_same<T,special_values>,void>::type* = nullptr)
     290    //--------------------------------------------------------------------
     291      : base_duration(InitBase(ss))
     292    //--------------------------------------------------------------------
     293    {}
    283294  };
    284295
    285296