[libc++] [LWG3321] Mark "year_month_day_last::day() specification does not cover...
authorMarek Kurdej <marek@quasardb.net>
Wed, 13 May 2020 09:37:58 +0000 (11:37 +0200)
committerMarek Kurdej <marek@quasardb.net>
Wed, 13 May 2020 09:45:55 +0000 (11:45 +0200)
commite25a2601aaa95c861af3228982ecbb2b1c19d27a
tree2524ad7b13ac1b5dfaaa73c500e8b94228cdba76
parent2866c6cad475f668bd0bffabb0513dc96ff157be
[libc++] [LWG3321] Mark "year_month_day_last::day() specification does not cover !ok() values" issue as "Nothing to do", but add assertion.

Summary:
This LWG issue states that the result of `year_month_day_last::day()` is implementation defined if `ok()` is `false`.
However, from user perspective, calling `day()` in this situation will lead to a (possibly difficult to find) crash.
Hence, I have added an assertion to warn user at least when assertions are enabled.
I am however not aware of the libc++ stand on the desired behaviour.

Reviewers: ldionne, mclow.lists, EricWF, #libc

Reviewed By: ldionne, #libc

Subscribers: christof, dexonsmith, libcxx-commits

Tags: #libc

Differential Revision: https://reviews.llvm.org/D70346
libcxx/include/chrono
libcxx/www/cxx2a_status.html