[Boost-bugs] [Boost C++ Libraries] #2824: constant boost::date_time::time_resolution_traits::ticks_per_second has wrong type

Subject: [Boost-bugs] [Boost C++ Libraries] #2824: constant boost::date_time::time_resolution_traits::ticks_per_second has wrong type
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2009-03-03 22:03:54


#2824: constant boost::date_time::time_resolution_traits::ticks_per_second has
wrong type
----------------------------------+-----------------------------------------
 Reporter: pelee_at_[hidden] | Owner: az_sw_dude
     Type: Bugs | Status: new
Milestone: Boost 1.39.0 | Component: date_time
  Version: Boost Release Branch | Severity: Problem
 Keywords: |
----------------------------------+-----------------------------------------
 The constant boost::date_time::time_resolution_traits::ticks_per_second is
 declared as an int, yet it is initialized to the template parameter
 resolution_adjust, which is of type frac_sec_type::int_type or
 boost::int64_t depending on compiler settings. When building for a 64 bit
 target this causes the constant value to be truncated to 32 bits. To fix
 this, the declaration of ticks_per_second should be made consistent with
 the declaration of resolution_adjust:


 {{{
 #if (defined(BOOST_MSVC) && (_MSC_VER < 1300))
     BOOST_STATIC_CONSTANT(boost::int64_t, ticks_per_second =
 resolution_adjust);
 #else
     BOOST_STATIC_CONSTANT(fractional_seconds_type, ticks_per_second =
 resolution_adjust);
 #endif
 }}}

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/2824>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:49:59 UTC