[all-commits] [llvm/llvm-project] ab5626: [libc++][test] Change forbidden `extents<char>` to...

Stephan T. Lavavej via All-commits all-commits at lists.llvm.org
Tue Nov 28 15:20:54 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ab562686d1d67962576b7a01346d9ff691b6b28d
      https://github.com/llvm/llvm-project/commit/ab562686d1d67962576b7a01346d9ff691b6b28d
  Author: Stephan T. Lavavej <stl at nuwen.net>
  Date:   2023-11-28 (Tue, 28 Nov 2023)

  Changed paths:
    M libcxx/test/std/containers/views/mdspan/ConvertibleToIntegral.h
    M libcxx/test/std/containers/views/mdspan/extents/CtorTestCombinations.h
    M libcxx/test/std/containers/views/mdspan/extents/obs_static.pass.cpp
    M libcxx/test/std/containers/views/mdspan/extents/types.pass.cpp
    M libcxx/test/std/containers/views/mdspan/layout_left/extents.verify.cpp
    M libcxx/test/std/containers/views/mdspan/layout_left/index_operator.pass.cpp
    M libcxx/test/std/containers/views/mdspan/layout_left/properties.pass.cpp
    M libcxx/test/std/containers/views/mdspan/layout_left/static_requirements.pass.cpp
    M libcxx/test/std/containers/views/mdspan/layout_right/extents.verify.cpp
    M libcxx/test/std/containers/views/mdspan/layout_right/index_operator.pass.cpp
    M libcxx/test/std/containers/views/mdspan/layout_right/properties.pass.cpp
    M libcxx/test/std/containers/views/mdspan/layout_right/static_requirements.pass.cpp
    M libcxx/test/std/containers/views/mdspan/layout_stride/extents.verify.cpp
    M libcxx/test/std/containers/views/mdspan/layout_stride/index_operator.pass.cpp
    M libcxx/test/std/containers/views/mdspan/layout_stride/properties.pass.cpp
    M libcxx/test/std/containers/views/mdspan/layout_stride/static_requirements.pass.cpp
    M libcxx/test/std/containers/views/mdspan/mdspan/assign.pass.cpp
    M libcxx/test/std/containers/views/mdspan/mdspan/ctor.copy.pass.cpp
    M libcxx/test/std/containers/views/mdspan/mdspan/ctor.default.pass.cpp
    M libcxx/test/std/containers/views/mdspan/mdspan/ctor.dh_array.pass.cpp
    M libcxx/test/std/containers/views/mdspan/mdspan/ctor.dh_extents.pass.cpp
    M libcxx/test/std/containers/views/mdspan/mdspan/ctor.dh_integers.pass.cpp
    M libcxx/test/std/containers/views/mdspan/mdspan/ctor.dh_map.pass.cpp
    M libcxx/test/std/containers/views/mdspan/mdspan/ctor.dh_map_acc.pass.cpp
    M libcxx/test/std/containers/views/mdspan/mdspan/ctor.dh_span.pass.cpp
    M libcxx/test/std/containers/views/mdspan/mdspan/ctor.move.pass.cpp
    M libcxx/test/std/containers/views/mdspan/mdspan/deduction.pass.cpp
    M libcxx/test/std/containers/views/mdspan/mdspan/index_operator.pass.cpp
    M libcxx/test/std/containers/views/mdspan/mdspan/move.pass.cpp
    M libcxx/test/std/containers/views/mdspan/mdspan/properties.pass.cpp
    M libcxx/test/std/containers/views/mdspan/mdspan/types.pass.cpp

  Log Message:
  -----------
  [libc++][test] Change forbidden `extents<char>` to `extents<signed char>` (#73535)

Found while running libc++'s test suite with MSVC's STL.

[mdspan.extents.overview]/1.1 mandates that IndexType is a signed or
unsigned integer type, which excludes char.

MSVC's STL enforces the Mandates here, so this PR changes the relevant
occurrences of `char to `signed char`. To make this work, we also need
to add an `operator signed char()` to the test helper type `IntType` so
it remains unambiguously convertible, and then we can remove `operator
char()`.

libc++ should also enforce the Mandates, but this PR doesn't attempt to make
such a change.




More information about the All-commits mailing list