From 29bb2094646d0ffac43db4fc61a907306b2a8e68 Mon Sep 17 00:00:00 2001 From: LE GARREC Vincent Date: Fri, 10 May 2019 09:26:32 +0200 Subject: [PATCH] Fix unsigned / signed conversion gregorian_calendar::end_of_month_day returns unsigned short and date constructor uses unsigned short too. --- include/boost/date_time/gregorian/greg_date.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/boost/date_time/gregorian/greg_date.hpp b/include/boost/date_time/gregorian/greg_date.hpp index 4f56bedf1..448ea90fa 100644 --- a/include/boost/date_time/gregorian/greg_date.hpp +++ b/include/boost/date_time/gregorian/greg_date.hpp @@ -120,7 +120,7 @@ namespace gregorian { date end_of_month() const { ymd_type ymd = year_month_day(); - short eom_day = gregorian_calendar::end_of_month_day(ymd.year, ymd.month); + unsigned short eom_day = gregorian_calendar::end_of_month_day(ymd.year, ymd.month); return date(ymd.year, ymd.month, eom_day); }