[all-commits] [llvm/llvm-project] 90f2d4: [libc++] Fix rejects-valid in std::span copy const...

Louis Dionne via All-commits all-commits at lists.llvm.org
Mon Aug 19 00:17:58 PDT 2024


  Branch: refs/heads/release/19.x
  Home:   https://github.com/llvm/llvm-project
  Commit: 90f2d48965ca8a27f4b814ada987d169ca6a6f44
      https://github.com/llvm/llvm-project/commit/90f2d48965ca8a27f4b814ada987d169ca6a6f44
  Author: Louis Dionne <ldionne.2 at gmail.com>
  Date:   2024-08-19 (Mon, 19 Aug 2024)

  Changed paths:
    M libcxx/include/span
    M libcxx/test/std/containers/views/views.span/span.cons/copy.pass.cpp

  Log Message:
  -----------
  [libc++] Fix rejects-valid in std::span copy construction (#104500)

Trying to copy-construct a std::span from another std::span holding an
incomplete type would fail as we evaluate the SFINAE for the range-based
constructor. The problem was that we checked for __is_std_span after
checking for the range being a contiguous_range, which hard-errored
because of arithmetic on a pointer to incomplete type.

As a drive-by, refactor the whole test and format it.

Fixes #104496

(cherry picked from commit 99696b35bc8a0054e0b0c1a26e8dd5049fa8c41b)



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list