Add tests for LWG 3206. NFC
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@363589 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/std/utilities/time/time.cal/time.cal.ymd/time.cal.ymd.members/op.sys_days.pass.cpp b/test/std/utilities/time/time.cal/time.cal.ymd/time.cal.ymd.members/op.sys_days.pass.cpp
index a956845..03d3bbb 100644
--- a/test/std/utilities/time/time.cal/time.cal.ymd/time.cal.ymd.members/op.sys_days.pass.cpp
+++ b/test/std/utilities/time/time.cal/time.cal.ymd/time.cal.ymd.members/op.sys_days.pass.cpp
@@ -90,5 +90,28 @@
assert( year_month_day{sd} == ymd); // and back
}
+// These two tests check the wording for LWG 3206
+ {
+ constexpr year_month_day ymd{year{1971}, month{1}, day{0}}; // bad day
+ static_assert(!ymd.ok(), "");
+ static_assert( ymd.year().ok(), "");
+ static_assert( ymd.month().ok(), "");
+ static_assert(!ymd.day().ok(), "");
+ constexpr sys_days sd{ymd};
+ static_assert(sd.time_since_epoch() == days{364}, "");
+ static_assert(sd == sys_days{ymd.year()/ymd.month()/day{1}} + (ymd.day() - day{1}), "");
+ }
+
+ {
+ constexpr year_month_day ymd{year{1970}, month{12}, day{32}}; // bad day
+ static_assert(!ymd.ok(), "");
+ static_assert( ymd.year().ok(), "");
+ static_assert( ymd.month().ok(), "");
+ static_assert(!ymd.day().ok(), "");
+ constexpr sys_days sd{ymd};
+ static_assert(sd.time_since_epoch() == days{365}, "");
+ static_assert(sd == sys_days{ymd.year()/ymd.month()/day{1}} + (ymd.day() - day{1}), "");
+ }
+
return 0;
}
diff --git a/www/upcoming_meeting.html b/www/upcoming_meeting.html
index f549232..bd96fc7 100644
--- a/www/upcoming_meeting.html
+++ b/www/upcoming_meeting.html
@@ -73,7 +73,7 @@
<tr><td><a href="https://wg21.link/LWG3198">3198</a></td><td>Yes</td><td>Bad constraint on <tt>std::span::span()</tt></td><td>Cologne</td><td>Complete</td></tr>
<tr><td><a href="https://wg21.link/LWG3199">3199</a></td><td>Yes</td><td><tt>istream >> bitset<0></tt> fails</td><td>Cologne</td><td></td></tr>
<tr><td><a href="https://wg21.link/LWG3202">3202</a></td><td>Yes</td><td>P0318R1 was supposed to be revised</td><td>Cologne</td><td>Complete</td></tr>
-<tr><td><a href="https://wg21.link/LWG3206">3206</a></td><td>Yes</td><td><tt>year_month_day</tt> conversion to <tt>sys_days</tt> uses not-existing member function</td><td>Cologne</td><td></td></tr>
+<tr><td><a href="https://wg21.link/LWG3206">3206</a></td><td>Yes</td><td><tt>year_month_day</tt> conversion to <tt>sys_days</tt> uses not-existing member function</td><td>Cologne</td><td>Complete</td></tr>
<tr><td><a href="https://wg21.link/LWG3208">3208</a></td><td>Yes</td><td><tt>Boolean</tt>'s expression requirements are ordered inconsistently</td><td>Cologne</td><td>Nothing to do</td></tr>
<tr><td><a href="https://wg21.link/LWG3209">3209</a></td><td>Yes</td><td>Expression in <tt>year::ok()</tt> returns clause is ill-formed</td><td>Cologne</td><td></td></tr>
</table>
@@ -107,7 +107,7 @@
<li>3198 - We already do this</li>
<li>3199 - Louis?</li>
<li>3202 - We already do this</li>
-<li>3206 - Marshall?</li>
+<li>3206 - We already do this; added a couple of explicit tests</li>
<li>3208 - Nothing to do; wording cleanup</li>
<li>3209 - Marshall?</li>
</ul>