Boost C++ Libraries: Ticket #12963: boost::time_period::span() returns invalid period if one of the periods is not-a-date-time https://svn.boost.org/trac10/ticket/12963 <p> 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. </p> <p> 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. </p> <p> 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. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/12963 Trac 1.4.3 Willi Burkhardt <willi.burkhardt@…> Wed, 12 Apr 2017 11:34:05 GMT attachment set https://svn.boost.org/trac10/ticket/12963 https://svn.boost.org/trac10/ticket/12963 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">utilities_ptime.cpp</span> </li> </ul> <p> global function that I use as workaround for the problem </p> Ticket