[all-commits] [llvm/llvm-project] 0c1484: Reland [libc++] [LWG3321] Mark "year_month_day_las...

Marek Kurdej via All-commits all-commits at lists.llvm.org
Thu May 21 12:56:11 PDT 2020


  Branch: refs/heads/arcpatch-D70346
  Home:   https://github.com/llvm/llvm-project
  Commit: 0c148430cf612762ca243aafe23b3fb9670d2797
      https://github.com/llvm/llvm-project/commit/0c148430cf612762ca243aafe23b3fb9670d2797
  Author: Marek Kurdej <marek at quasardb.net>
  Date:   2020-05-21 (Thu, 21 May 2020)

  Changed paths:
    M libcxx/include/chrono
    M libcxx/test/libcxx/algorithms/debug_less.pass.cpp
    M libcxx/www/cxx2a_status.html

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

Reviewed By: ldionne, #libc

Differential Revision: https://reviews.llvm.org/D70346




More information about the All-commits mailing list