[Boost-bugs] [Boost C++ Libraries] #13150: Exception thrown when adding long duration to a date

Subject: [Boost-bugs] [Boost C++ Libraries] #13150: Exception thrown when adding long duration to a date
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2017-08-07 22:12:48


#13150: Exception thrown when adding long duration to a date
-------------------------------------------------+-------------------------
 Reporter: Roman Werpachowski | Owner: az_sw_dude
  <roman.werpachowski@…> |
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: date_time
  Version: Boost 1.59.0 | Severity: Problem
 Keywords: |
-------------------------------------------------+-------------------------
 This code throws an exception:

 {{{
 int main(void) {
     boost::gregorian::date d1(1500, 6, 1);
     boost::gregorian::date d2(4500, 6, 1);
     const auto duration = boost::gregorian::years(3000);
     std::cout << d1 << " + " << duration.number_of_years() << "Y\n";
     const auto d3 = d1 + duration; // this throws
     std::cout << d3 << "\n";
 }
 }}}

 Using boost-1.59 under Windows, Visual Studio 2015 64-bit.

-- 
Ticket URL: <https://svn.boost.org/trac10/boost/ticket/13150>
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-08-07 22:17:14 UTC