diff --git a/libcxx/include/chrono b/libcxx/include/chrono --- a/libcxx/include/chrono +++ b/libcxx/include/chrono @@ -824,6 +824,7 @@ */ #include <__config> +#include <__debug> #include #include #include @@ -2454,6 +2455,7 @@ chrono::day(31), chrono::day(31), chrono::day(30), chrono::day(31), chrono::day(30), chrono::day(31) }; + _LIBCPP_ASSERT(ok(), "year_month_day_last::day(): year_month_day_last is invalid"); return month() != February || !__y.is_leap() ? __d[static_cast(month()) - 1] : chrono::day{29}; } diff --git a/libcxx/test/libcxx/algorithms/debug_less.pass.cpp b/libcxx/test/libcxx/algorithms/debug_less.pass.cpp --- a/libcxx/test/libcxx/algorithms/debug_less.pass.cpp +++ b/libcxx/test/libcxx/algorithms/debug_less.pass.cpp @@ -14,8 +14,13 @@ // __debug_less checks that a comparator actually provides a strict-weak ordering. +#include // Include before defining _LIBCPP_ASSERT: cannot throw in a function marked noexcept. + struct DebugException {}; +#ifdef _LIBCPP_ASSERT +#undef _LIBCPP_ASSERT +#endif #define _LIBCPP_DEBUG 0 #define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : throw ::DebugException()) diff --git a/libcxx/www/cxx2a_status.html b/libcxx/www/cxx2a_status.html --- a/libcxx/www/cxx2a_status.html +++ b/libcxx/www/cxx2a_status.html @@ -439,7 +439,7 @@ 3209Expression in year::ok() returns clause is ill-formedCologneComplete - 3231year_month_day_last::day specification does not cover !ok() valuesBelfast + 3231year_month_day_last::day specification does not cover !ok() valuesBelfastNothing to do 3225zoned_time converting constructor shall not be noexceptBelfast 3190std::allocator::allocate sometimes returns too little storageBelfast 3218Modifier for %d parse flag does not match POSIX and format specificationBelfast