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.
Details
Details
- Reviewers
ldionne mclow.lists EricWF - Group Reviewers
Restricted Project - Commits
- rGcb347a1106a7: [libc++] Remove assertion in year_month_day_last::day()
rG0c148430cf61: Reland [libc++] [LWG3321] Mark "year_month_day_last::day() specification does…
rGe25a2601aaa9: [libc++] [LWG3321] Mark "year_month_day_last::day() specification does not…
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Time | Test | |
---|---|---|
90 ms | LLVM.DebugInfo/X86::Unknown Unit Message (" |