Boost C++ Libraries: Ticket #2824: constant boost::date_time::time_resolution_traits::ticks_per_second has wrong type https://svn.boost.org/trac10/ticket/2824 <p> 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: </p> <pre class="wiki">#if (defined(BOOST_MSVC) &amp;&amp; (_MSC_VER &lt; 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 </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/2824 Trac 1.4.3 Andrey Semashev Sat, 06 Jun 2009 11:25:57 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/2824#comment:1 https://svn.boost.org/trac10/ticket/2824#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/53678" title="Fixes #2824.">[53678]</a>) Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/2824" title="#2824: Bugs: constant boost::date_time::time_resolution_traits::ticks_per_second ... (closed: fixed)">#2824</a>. </p> Ticket