Fix compilation error with GCC 5

GCC 5 complains that `operator-=` and `operator+=` are not constexpr.  The `-` and `+` operator appear seem to be fine.
This commit is contained in:
maximilianriemensberger
2019-08-13 09:57:42 +02:00
committed by Howard Hinnant
parent b87eb970c1
commit cb4bf26fc7

View File

@ -3917,7 +3917,7 @@ make12(std::chrono::hours h) NOEXCEPT
else else
{ {
if (h != hours{12}) if (h != hours{12})
h -= hours{12}; h = h - hours{12};
} }
return h; return h;
} }
@ -3931,7 +3931,7 @@ make24(std::chrono::hours h, bool is_pm) NOEXCEPT
if (is_pm) if (is_pm)
{ {
if (h != hours{12}) if (h != hours{12})
h += hours{12}; h = h + hours{12};
} }
else if (h == hours{12}) else if (h == hours{12})
h = hours{0}; h = hours{0};