[libcxx-commits] [libcxx] [libc++] Fix the mdspan ElementType complete object type mandate (PR #191703)

via libcxx-commits libcxx-commits at lists.llvm.org
Sun Apr 12 05:24:26 PDT 2026


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff origin/main HEAD --extensions h,cpp -- libcxx/include/__mdspan/mdspan.h libcxx/test/std/containers/views/mdspan/mdspan/element_type.verify.cpp --diff_from_common_commit
``````````

:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/libcxx/test/std/containers/views/mdspan/mdspan/element_type.verify.cpp b/libcxx/test/std/containers/views/mdspan/mdspan/element_type.verify.cpp
index 13d8bc911..928b381a1 100644
--- a/libcxx/test/std/containers/views/mdspan/mdspan/element_type.verify.cpp
+++ b/libcxx/test/std/containers/views/mdspan/mdspan/element_type.verify.cpp
@@ -24,9 +24,9 @@ public:
 };
 
 struct BadAccessor {
-  using offset_policy = BadAccessor;
-  using element_type = void;
-  using reference    = void;
+  using offset_policy    = BadAccessor;
+  using element_type     = void;
+  using reference        = void;
   using data_handle_type = element_type*;
   reference access(data_handle_type, size_t) const;
 };

``````````

</details>


https://github.com/llvm/llvm-project/pull/191703


More information about the libcxx-commits mailing list