]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libstdc++: Add header mdspan to the build-system.
authorLuc Grosheintz <luc.grosheintz@gmail.com>
Tue, 29 Apr 2025 12:46:08 +0000 (14:46 +0200)
committerJonathan Wakely <redi@gcc.gnu.org>
Wed, 7 May 2025 10:47:39 +0000 (11:47 +0100)
Creates a nearly empty header mdspan and adds it to the build-system and
Doxygen config file.

libstdc++-v3/ChangeLog:

* doc/doxygen/user.cfg.in: Add <mdspan>.
* include/Makefile.am: Ditto.
* include/Makefile.in: Ditto.
* include/precompiled/stdc++.h: Ditto.
* include/std/mdspan: New file.

Signed-off-by: Luc Grosheintz <luc.grosheintz@gmail.com>
libstdc++-v3/doc/doxygen/user.cfg.in
libstdc++-v3/include/Makefile.am
libstdc++-v3/include/Makefile.in
libstdc++-v3/include/precompiled/stdc++.h
libstdc++-v3/include/std/mdspan [new file with mode: 0644]

index 19ae67a67baccba41f4c0f395a3afef48c295d07..e926c6707f6745081c5d610a4dad1a0a46858777 100644 (file)
@@ -880,6 +880,7 @@ INPUT                  = @srcdir@/doc/doxygen/doxygroups.cc \
                          include/list \
                          include/locale \
                          include/map \
+                         include/mdspan \
                          include/memory \
                          include/memory_resource \
                          include/mutex \
index 537774c266897c40c0be34366dc175b74e5fc4b6..1140fa0dffd156f5a6cb7117f56f0d1f4f34b8fe 100644 (file)
@@ -38,6 +38,7 @@ std_freestanding = \
        ${std_srcdir}/generator \
        ${std_srcdir}/iterator \
        ${std_srcdir}/limits \
+       ${std_srcdir}/mdspan \
        ${std_srcdir}/memory \
        ${std_srcdir}/numbers \
        ${std_srcdir}/numeric \
index 7b96b2207f848f18e7d9dd27c9eb879b9f918003..c96e981acd6e0c2ebb2753540e75438d289873e1 100644 (file)
@@ -396,6 +396,7 @@ std_freestanding = \
        ${std_srcdir}/generator \
        ${std_srcdir}/iterator \
        ${std_srcdir}/limits \
+       ${std_srcdir}/mdspan \
        ${std_srcdir}/memory \
        ${std_srcdir}/numbers \
        ${std_srcdir}/numeric \
index f4b312d9e470e87c7bac0373092762682c8ec184..e7d89c9270496389f2c4ce95770386fddf205785 100644 (file)
 #include <flat_map>
 #include <flat_set>
 #include <generator>
+#include <mdspan>
 #include <print>
 #include <spanstream>
 #include <stacktrace>
diff --git a/libstdc++-v3/include/std/mdspan b/libstdc++-v3/include/std/mdspan
new file mode 100644 (file)
index 0000000..78a00a5
--- /dev/null
@@ -0,0 +1,48 @@
+// <mdspan> -*- C++ -*-
+
+// Copyright The GNU Toolchain Authors.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file mdspan
+ *  This is a Standard C++ Library header.
+ */
+
+#ifndef _GLIBCXX_MDSPAN
+#define _GLIBCXX_MDSPAN 1
+
+#ifdef _GLIBCXX_SYSHDR
+#pragma GCC system_header
+#endif
+
+#define __glibcxx_want_mdspan
+#include <bits/version.h>
+
+#ifdef __glibcxx_mdspan
+
+namespace std _GLIBCXX_VISIBILITY(default)
+{
+_GLIBCXX_BEGIN_NAMESPACE_VERSION
+
+_GLIBCXX_END_NAMESPACE_VERSION
+}
+#endif
+#endif