From 57b2686d52148ae2cef73fbb4b67f64460c5c333 Mon Sep 17 00:00:00 2001 From: Howard Hinnant Date: Wed, 23 Dec 2015 13:19:36 -0500 Subject: [PATCH] Add missing date composition operator --- iso_week.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/iso_week.h b/iso_week.h index a9e2fe0..9a84d8f 100644 --- a/iso_week.h +++ b/iso_week.h @@ -73,6 +73,7 @@ CONSTCD11 weeknum_weekday operator/(const weekday& wd, int wn) NOEXCE CONSTCD11 lastweek_weekday operator/(const last_week& wn, const weekday& wd) NOEXCEPT; CONSTCD11 lastweek_weekday operator/(const last_week& wn, int wd) NOEXCEPT; +CONSTCD11 lastweek_weekday operator/(const weekday& wd, const last_week& wn) NOEXCEPT; CONSTCD11 year_weeknum_weekday operator/(const year_weeknum& ywn, const weekday& wd) NOEXCEPT; CONSTCD11 year_weeknum_weekday operator/(const year_weeknum& ywn, int wd) NOEXCEPT; @@ -1600,7 +1601,15 @@ inline lastweek_weekday operator/(const last_week& wn, int wd) NOEXCEPT { - return wn/weekday{static_cast(wd)}; + return wn / weekday{static_cast(wd)}; +} + +CONSTCD11 +inline +lastweek_weekday +operator/(const weekday& wd, const last_week& wn) NOEXCEPT +{ + return wn / wd; } CONSTCD11