[all-commits] [llvm/llvm-project] e25a26: [libc++] [LWG3321] Mark "year_month_day_last::day(...

Marek Kurdej via All-commits all-commits at lists.llvm.org
Wed May 13 02:46:18 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: e25a2601aaa95c861af3228982ecbb2b1c19d27a
      https://github.com/llvm/llvm-project/commit/e25a2601aaa95c861af3228982ecbb2b1c19d27a
  Author: Marek Kurdej <marek at quasardb.net>
  Date:   2020-05-13 (Wed, 13 May 2020)

  Changed paths:
    M libcxx/include/chrono
    M libcxx/www/cxx2a_status.html

  Log Message:
  -----------
  [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




More information about the All-commits mailing list