title: c++ Boost : gregorian_calendar.ipp(77,1): error C2666: '-': 17 overloads have similar conversions in Visual Studio 2019 x64
body: <p>i have a strange compilation error when trying to link a simple app with boost and <a href="https://github.com/robinrowe/libunistd" rel="nofollow noreferrer">libunistd</a>.
  Now both are complied with x64
  my linking librarys are :</p>
  <pre><code>libboost_filesystem-vc142-mt-sgd-x64-1_75.lib
  libboost_system-vc142-mt-sgd-x64-1_75.lib
  libboost_thread-vc142-mt-sgd-x64-1_75.lib
  libunistd.lib
  libportable.lib
  </code></pre>
  <p>using flags :</p>
  <pre><code>BOOST_ASIO_ENABLE_BUFFER_DEBUGGING 
  BOOST_ASIO_ENABLE_HANDLER_TRACKING
  </code></pre>
  <p>But i keep getting :</p>
  <pre><code>C:\Dev\my\cpp\libs\boost_1_75_0\boost\date_time\gregorian_calendar.ipp(77,1): error C2666: '-': 17 overloads have similar conversions
  1&gt;C:\Dev\my\cpp\libs\libunistd-master\unistd\int128\Int128.h(855,17): message : could be '_uint128 operator -(const _uint128 &amp;,unsigned short)'
  1&gt;C:\Dev\my\cpp\libs\libunistd-master\unistd\int128\Int128.h(852,17): message : or       '_uint128 operator -(const _uint128 &amp;,short)'
  1&gt;C:\Dev\my\cpp\libs\libunistd-master\unistd\int128\Int128.h(849,17): message : or       '_uint128 operator -(const _uint128 &amp;,unsigned int)'
  1&gt;C:\Dev\my\cpp\libs\libunistd-master\unistd\int128\Int128.h(846,17): message : or       '_uint128 operator -(const _uint128 &amp;,int)'
  1&gt;C:\Dev\my\cpp\libs\libunistd-master\unistd\int128\Int128.h(843,17): message : or       '_uint128 operator -(const _uint128 &amp;,unsigned long)'
  1&gt;C:\Dev\my\cpp\libs\libunistd-master\unistd\int128\Int128.h(840,17): message : or       '_uint128 operator -(const _uint128 &amp;,long)'
  1&gt;C:\Dev\my\cpp\libs\libunistd-master\unistd\int128\Int128.h(837,17): message : or       '_uint128 operator -(const _uint128 &amp;,unsigned __int64)'
  1&gt;C:\Dev\my\cpp\libs\libunistd-master\unistd\int128\Int128.h(834,17): message : or       '_uint128 operator -(const _uint128 &amp;,__int64)'
  1&gt;C:\Dev\my\cpp\libs\libunistd-master\unistd\int128\Int128.h(830,17): message : or       '_int128 operator -(const _int128 &amp;,unsigned short)'
  1&gt;C:\Dev\my\cpp\libs\libunistd-master\unistd\int128\Int128.h(827,17): message : or       '_int128 operator -(const _int128 &amp;,short)'
  1&gt;C:\Dev\my\cpp\libs\libunistd-master\unistd\int128\Int128.h(824,17): message : or       '_int128 operator -(const _int128 &amp;,unsigned int)'
  1&gt;C:\Dev\my\cpp\libs\libunistd-master\unistd\int128\Int128.h(821,17): message : or       '_int128 operator -(const _int128 &amp;,int)'
  1&gt;C:\Dev\my\cpp\libs\libunistd-master\unistd\int128\Int128.h(818,17): message : or       '_int128 operator -(const _int128 &amp;,unsigned long)'
  1&gt;C:\Dev\my\cpp\libs\libunistd-master\unistd\int128\Int128.h(815,17): message : or       '_int128 operator -(const _int128 &amp;,long)'
  1&gt;C:\Dev\my\cpp\libs\libunistd-master\unistd\int128\Int128.h(812,17): message : or       '_int128 operator -(const _int128 &amp;,unsigned __int64)'
  1&gt;C:\Dev\my\cpp\libs\libunistd-master\unistd\int128\Int128.h(809,17): message : or       '_int128 operator -(const _int128 &amp;,__int64)'
  1&gt;C:\Dev\my\cpp\libs\libunistd-master\unistd\int128\Int128.h(347,17): message : or       '_uint128 operator -(const _uint128 &amp;,const _uint128 &amp;)'
  1&gt;C:\Dev\my\cpp\libs\libunistd-master\unistd\int128\Int128.h(342,17): message : or       '_uint128 operator -(const _uint128 &amp;,const _int128 &amp;)'
  1&gt;C:\Dev\my\cpp\libs\libunistd-master\unistd\int128\Int128.h(337,16): message : or       '_int128 operator -(const _int128 &amp;,const _uint128 &amp;)'
  1&gt;C:\Dev\my\cpp\libs\libunistd-master\unistd\int128\Int128.h(332,16): message : or       '_int128 operator -(const _int128 &amp;,const _int128 &amp;)'
  1&gt;C:\Dev\my\cpp\libs\boost_1_75_0\boost\date_time\gregorian\greg_duration.hpp(119,17): message : or       'boost::gregorian::date_duration boost::gregorian::operator -(boost::gregorian::date_duration,const boost::gregorian::date_duration &amp;)' [found using argument-dependent lookup]
  1&gt;C:\Dev\my\cpp\libs\boost_1_75_0\boost\date_time\gregorian_calendar.ipp(77,1): message : or       'built-in C++ operator-(int, int)'
  1&gt;C:\Dev\my\cpp\libs\boost_1_75_0\boost\date_time\gregorian_calendar.ipp(77,1): message : while trying to match the argument list '(int, const MonthType)'
  1&gt;        with
  1&gt;        [
  1&gt;            MonthType=boost::gregorian::greg_month
  1&gt;        ]
  1&gt;C:\Dev\my\cpp\libs\boost_1_75_0\boost\date_time\gregorian_calendar.ipp(76): message : while compiling class template member function 'unsigned int boost::date_time::gregorian_calendar_base&lt;boost::gregorian::greg_year_month_day,unsigned int&gt;::day_number(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:\Dev\my\cpp\libs\boost_1_75_0\boost\date_time\date.hpp(75): message : see reference to function template instantiation 'unsigned int boost::date_time::gregorian_calendar_base&lt;boost::gregorian::greg_year_month_day,unsigned int&gt;::day_number(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:\Dev\my\cpp\libs\boost_1_75_0\boost\date_time\gregorian\greg_calendar.hpp(28): message : see reference to class template instantiation 'boost::date_time::gregorian_calendar_base&lt;boost::gregorian::greg_year_month_day,unsigned int&gt;' being compiled
  </code></pre>
  <p>this is the boost part which it keep fail:</p>
  <pre><code>template&lt;typename ymd_type_, typename date_int_type_&gt;
    BOOST_CXX14_CONSTEXPR
    inline
    date_int_type_
    gregorian_calendar_base&lt;ymd_type_,date_int_type_&gt;::day_number(const ymd_type&amp; ymd)
    {
      unsigned short a = static_cast&lt;unsigned short&gt;((14-ymd.month)/12);
      unsigned short y = static_cast&lt;unsigned short&gt;(ymd.year + 4800 - a);
      unsigned short m = static_cast&lt;unsigned short&gt;(ymd.month + 12*a - 3);
      unsigned long  d = ymd.day + ((153*m + 2)/5) + 365*y + (y/4) - (y/100) + (y/400) - 32045;
      return static_cast&lt;date_int_type&gt;(d);
    }
  </code></pre>
  <p>and this is the <a href="https://github.com/robinrowe/libunistd/blob/master/unistd/int128/Int128.h" rel="nofollow noreferrer">int128</a> that keep failing</p>