[Boost-bugs] [Boost C++ Libraries] #12963: boost::time_period::span() returns invalid period if one of the periods is not-a-date-time

Subject: [Boost-bugs] [Boost C++ Libraries] #12963: boost::time_period::span() returns invalid period if one of the periods is not-a-date-time
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2017-04-12 11:32:50


#12963: boost::time_period::span() returns invalid period if one of the periods is
not-a-date-time
-------------------------------+------------------------
 Reporter: willi.burkhardt@… | Owner: az_sw_dude
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: date_time
  Version: Boost 1.62.0 | Severity: Problem
 Keywords: time_period span |
-------------------------------+------------------------
 In some cases, the time_period::span() function returns a less than
 optimal result.
 The expected behavior is that if one of the two periods is invalid/not-a
 -date-time the other is returned.

 What I observed is that if one of the two source periods is not-a-date-
 time, the length() of the period returned is wrong/broken; invalidating
 the resulting time_period.

 I might be wrong with my expectation above, but in this case it should be
 at least documented. Attached is a global function that I use to "fix" it
 in my code.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/12963>
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-04-12 11:35:31 UTC