Modify

Opened 8 years ago

Closed 8 years ago

#2824 closed Bugs (fixed)

constant boost::date_time::time_resolution_traits::ticks_per_second has wrong type

Reported by: pelee@… Owned by: az_sw_dude
Milestone: Boost 1.39.0 Component: date_time
Version: Boost Release Branch Severity: Problem
Keywords: Cc:

Description

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

Attachments (0)

Change History (1)

comment:1 Changed 8 years ago by andysem

  • Resolution set to fixed
  • Status changed from new to closed

(In [53678]) Fixes #2824.

Add Comment

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain az_sw_dude.
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.