[all-commits] [llvm/llvm-project] 4dd901: [libc++] Fix the noexceptness of __decay_copy.

Quuxplusone via All-commits all-commits at lists.llvm.org
Mon Dec 13 14:58:18 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4dd901f4d3aa072309eb23fbd8497f7916f7d77c
      https://github.com/llvm/llvm-project/commit/4dd901f4d3aa072309eb23fbd8497f7916f7d77c
  Author: Arthur O'Dwyer <arthur.j.odwyer at gmail.com>
  Date:   2021-12-13 (Mon, 13 Dec 2021)

  Changed paths:
    M libcxx/include/__utility/decay_copy.h
    M libcxx/test/std/ranges/range.access/range.access.begin/begin.pass.cpp
    M libcxx/test/std/ranges/range.access/range.access.end/end.pass.cpp

  Log Message:
  -----------
  [libc++] Fix the noexceptness of __decay_copy.

When `a` was an array type, `__decay_copy(a)` was incorrectly marking itself
noexcept(false), because it is false that `int[10]` is nothrow convertible to `int[10]`
(in fact it is not convertible at all).

We have no tests explicitly for `__decay_copy`, but the new ranges::begin
and ranges::end tests fail before this patch.

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




More information about the All-commits mailing list