Boost C++ Libraries: Ticket #13150: Exception thrown when adding long duration to a date https://svn.boost.org/trac10/ticket/13150 <p> This code throws an exception: </p> <pre class="wiki">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 &lt;&lt; d1 &lt;&lt; " + " &lt;&lt; duration.number_of_years() &lt;&lt; "Y\n"; const auto d3 = d1 + duration; // this throws std::cout &lt;&lt; d3 &lt;&lt; "\n"; } </pre><p> Using boost-1.59 under Windows, Visual Studio 2015 64-bit. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/13150 Trac 1.4.3 James E. King, III Wed, 28 Mar 2018 19:05:16 GMT owner changed https://svn.boost.org/trac10/ticket/13150#comment:1 https://svn.boost.org/trac10/ticket/13150#comment:1 <ul> <li><strong>owner</strong> changed from <span class="trac-author">az_sw_dude</span> to <span class="trac-author">James E. King, III</span> </li> </ul> Ticket James E. King, III Wed, 28 Mar 2018 19:07:23 GMT status, milestone changed; resolution set https://svn.boost.org/trac10/ticket/13150#comment:2 https://svn.boost.org/trac10/ticket/13150#comment:2 <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">worksforme</span> </li> <li><strong>milestone</strong> <span class="trac-field-old">To Be Determined</span> → <span class="trac-field-new">Boost 1.67.0</span> </li> </ul> <p> I added the code to one of the date_time unit tests (and validated that d3 == d2), and it runs okay on Visual Studio 2015, 32 and 64-bit, debug and release, also on msvc-14.1 and on gcc. There's a chance this was fixed in 1.67.0 with the 32-bit issues resolved. </p> <p> As such I am marking it as "worksforme". </p> Ticket