[Boost-bugs] [Boost C++ Libraries] #9419: boost::chrono::floor() and negative durations is wrong

Subject: [Boost-bugs] [Boost C++ Libraries] #9419: boost::chrono::floor() and negative durations is wrong
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-11-21 22:01:59


#9419: boost::chrono::floor() and negative durations is wrong
------------------------------+---------------------
 Reporter: 1czajnik@… | Owner: viboes
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: chrono
  Version: Boost 1.54.0 | Severity: Problem
 Keywords: |
------------------------------+---------------------
 The assert in the following program fails:

 {{{
 #include <boost/chrono/floor.hpp>
 #include <cassert>

 int main()
 {
     boost::chrono::nanoseconds const nsec( -1 );
     boost::chrono::seconds const sec =
         boost::chrono::floor<boost::chrono::seconds>(nsec);
     assert( sec.count() == -1 );
 }
 }}}

 Regards,
 Kris

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/9419>
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:50:14 UTC