Boost C++ Libraries: Ticket #10154: Compilation error in gregorian_calendar.ipp: is_leap_year https://svn.boost.org/trac10/ticket/10154 <p> Using visual studio 2013, I get the following compilation error: </p> <p> 1&gt;C:\Libs\CLibs\boost_1.55.0\include\boost/date_time/gregorian_calendar.ipp(167): error C2675: unary '!' : 'boost::type' does not define this operator or a conversion to a type acceptable to the predefined operator 1&gt; C:\Libs\CLibs\boost_1.55.0\include\boost/date_time/gregorian_calendar.ipp(165) : while compiling class template member function 'bool boost::date_time::gregorian_calendar_base&lt;boost::gregorian::greg_year_month_day,unsigned int&gt;::is_leap_year(boost::gregorian::greg_year)' 1&gt; C:\Libs\CLibs\boost_1.55.0\include\boost/date_time/gregorian_calendar.ipp(51) : see reference to function template instantiation 'bool boost::date_time::gregorian_calendar_base&lt;boost::gregorian::greg_year_month_day,unsigned int&gt;::is_leap_year(boost::gregorian::greg_year)' being compiled 1&gt; C:\Libs\CLibs\boost_1.55.0\include\boost/date_time/gregorian_calendar.ipp(22) : while compiling class template member function 'unsigned short boost::date_time::gregorian_calendar_base&lt;boost::gregorian::greg_year_month_day,unsigned int&gt;::day_of_week(const boost::date_time::year_month_day_base&lt;boost::gregorian::greg_year,boost::gregorian::greg_month,boost::gregorian::greg_day&gt; &amp;)' 1&gt; C:\Libs\CLibs\boost_1.55.0\include\boost/date_time/date.hpp(95) : see reference to function template instantiation 'unsigned short boost::date_time::gregorian_calendar_base&lt;boost::gregorian::greg_year_month_day,unsigned int&gt;::day_of_week(const boost::date_time::year_month_day_base&lt;boost::gregorian::greg_year,boost::gregorian::greg_month,boost::gregorian::greg_day&gt; &amp;)' being compiled 1&gt; C:\Libs\CLibs\boost_1.55.0\include\boost/date_time/gregorian/greg_calendar.hpp(27) : see reference to class template instantiation 'boost::date_time::gregorian_calendar_base&lt;boost::gregorian::greg_year_month_day,unsigned int&gt;' being compiled </p> <p> --- </p> <p> Include tree: </p> <p> "C:<br />Libs<br />CLibs<br />boost_1.55.0<br />include<br />boost/thread.hpp" "C:<br />Libs<br />CLibs<br />boost_1.55.0<br />include<br />boost/thread/thread.hpp" "C:<br />Libs<br />CLibs<br />boost_1.55.0<br />include<br />boost/thread/thread_only.hpp" "C:<br />Libs<br />CLibs<br />boost_1.55.0<br />include<br />boost/thread/win32/thread_data.hpp" "C:<br />Libs<br />CLibs<br />boost_1.55.0<br />include<br />boost/thread/thread_time.hpp" "C:<br />Libs<br />CLibs<br />boost_1.55.0<br />include<br />boost/date_time/posix_time/posix_tim e_types.hpp" "C:<br />Libs<br />CLibs<br />boost_1.55.0<br />include<br />boost/date_time/posix_time/ptime.hpp " "C:<br />Libs<br />CLibs<br />boost_1.55.0<br />include<br />boost/date_time/posix_time/posix_tim e_system.hpp" "C:<br />Libs<br />CLibs<br />boost_1.55.0<br />include<br />boost/date_time/posix_time/posix_ti me_config.hpp" "C:<br />Libs<br />CLibs<br />boost_1.55.0<br />include<br />boost/date_time/gregorian/gregorian _types.hpp" "C:<br />Libs<br />CLibs<br />boost_1.55.0<br />include<br />boost/date_time/gregorian/greg_cale ndar.hpp" "C:<br />Libs<br />CLibs<br />boost_1.55.0<br />include<br />boost/date_time/gregorian_calendar.h pp" "C:<br />Libs<br />CLibs<br />boost_1.55.0<br />include<br />boost/date_time/gregorian_calendar.i pp" </p> <p> --- </p> <p> Changing the line 167 to: </p> <blockquote> <table class="wiki"> <tr>return (!((unsigned short)year % 4)) &amp;&amp; (((unsigned short)year % 100) <td> (!((unsigned short)year % 400))); </td></tr></table> </blockquote> <p> ... fixes the problem. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/10154 Trac 1.4.3 anonymous Thu, 26 Jun 2014 15:55:42 GMT <link>https://svn.boost.org/trac10/ticket/10154#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/10154#comment:1</guid> <description> <p> I had set the following preprocessor definitions: </p> <p> WIN32;_DEBUG;_WIN32_WINNT=0x0501;_WINDLL; </p> </description> <category>Ticket</category> </item> <item> <dc:creator>James E. King, III</dc:creator> <pubDate>Sat, 06 Jan 2018 15:56:52 GMT</pubDate> <title>owner changed https://svn.boost.org/trac10/ticket/10154#comment:2 https://svn.boost.org/trac10/ticket/10154#comment:2 <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 Sat, 06 Jan 2018 15:58:34 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/10154#comment:3 https://svn.boost.org/trac10/ticket/10154#comment:3 <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">invalid</span> </li> </ul> <p> Please provide sample code (a unit test in date_time is preferred) to show how it was called. Given the report is anonymous, resolving as invalid. </p> Ticket