From cb4bf26fc7e80a1285d4a704990988e6c2d44103 Mon Sep 17 00:00:00 2001 From: maximilianriemensberger Date: Tue, 13 Aug 2019 09:57:42 +0200 Subject: [PATCH] Fix compilation error with GCC 5 GCC 5 complains that `operator-=` and `operator+=` are not constexpr. The `-` and `+` operator appear seem to be fine. --- include/date/date.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/date/date.h b/include/date/date.h index be68a87..90bdcf5 100644 --- a/include/date/date.h +++ b/include/date/date.h @@ -3917,7 +3917,7 @@ make12(std::chrono::hours h) NOEXCEPT else { if (h != hours{12}) - h -= hours{12}; + h = h - hours{12}; } return h; } @@ -3931,7 +3931,7 @@ make24(std::chrono::hours h, bool is_pm) NOEXCEPT if (is_pm) { if (h != hours{12}) - h += hours{12}; + h = h + hours{12}; } else if (h == hours{12}) h = hours{0};