[libcxx-commits] [libcxx] [libc++] Implement P2897R7 aligned_accessor: An mdspan accessor expressing pointer over-alignment (PR #122603)

A. Jiang via libcxx-commits libcxx-commits at lists.llvm.org
Sun Jan 12 18:37:02 PST 2025


================
@@ -0,0 +1,86 @@
+// -*- C++ -*-
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//                        Kokkos v. 4.0
+//       Copyright (2022) National Technology & Engineering
+//               Solutions of Sandia, LLC (NTESS).
+//
+// Under the terms of Contract DE-NA0003525 with NTESS,
+// the U.S. Government retains certain rights in this software.
+//
+//===---------------------------------------------------------------------===//
+
+#ifndef _LIBCPP___MDSPAN_ALIGNED_ACCESSOR_H
+#define _LIBCPP___MDSPAN_ALIGNED_ACCESSOR_H
+
+#include <__config>
+#include <__cstddef/size_t.h>
----------------
frederick-vs-ja wrote:

For Clang builds, it seems that we need to include `< __mdspan/default_accessor.h>` to obtain `default_accessor`.

```suggestion
#include <__cstddef/size_t.h>
#include < __mdspan/default_accessor.h>
```

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


More information about the libcxx-commits mailing list