From 6068df5540ddb0d38580be982af3bd1c9a154900 Mon Sep 17 00:00:00 2001 From: Marco Bubke Date: Tue, 24 Sep 2024 11:19:54 +0200 Subject: [PATCH] Utils: Update span The last snapshot had probems with ranges. Change-Id: I338c4d7a5d82fd65d4500cebec605a4652de0c1c Reviewed-by: Tim Jenssen --- qt_attributions.json | 1 + src/libs/3rdparty/span/README.md | 2 +- src/libs/3rdparty/span/span.hpp | 10 +++++----- src/libs/utils/span.h | 3 +++ 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/qt_attributions.json b/qt_attributions.json index 37dabd8e7fc..5f9e1e5343d 100644 --- a/qt_attributions.json +++ b/qt_attributions.json @@ -335,6 +335,7 @@ "Path": "src/libs/3rdparty/span", "Description": "A single-header implementation of C++20's std::span, conforming to the C++20 committee draft.", "Homepage": "https://github.com/martinmoene/span-lite", + "Version": "00afc28", "License": "Boost Software License 1.0", "LicenseFile": "src/libs/3rdparty/span/LICENSE_1_0.txt", "Copyright": "Copyright 2018-2021 Martin Moene" diff --git a/src/libs/3rdparty/span/README.md b/src/libs/3rdparty/span/README.md index dcc95ab6cea..6debd010a3c 100644 --- a/src/libs/3rdparty/span/README.md +++ b/src/libs/3rdparty/span/README.md @@ -1,7 +1,7 @@ # span lite: A single-file header-only version of a C++20-like span for C++98, C++11 and later -[![Language](https://img.shields.io/badge/C%2B%2B-98/11/14/17/20-blue.svg)](https://en.wikipedia.org/wiki/C%2B%2B#Standardization) [![License](https://img.shields.io/badge/license-BSL-blue.svg)](https://opensource.org/licenses/BSL-1.0) [![Build Status](https://github.com/martinmoene/span-lite/actions/workflows/ci.yml/badge.svg)](https://github.com/martinmoene/span-lite/actions/workflows/ci.yml) [![Build status](https://ci.appveyor.com/api/projects/status/1ha3wnxtam547m8p?svg=true)](https://ci.appveyor.com/project/martinmoene/span-lite) [![Version](https://badge.fury.io/gh/martinmoene%2Fspan-lite.svg)](https://github.com/martinmoene/span-lite/releases) [![download](https://img.shields.io/badge/latest-download-blue.svg)](https://github.com/martinmoene/span-lite/blob/master/include/nonstd/span.hpp) [![Conan](https://img.shields.io/badge/on-conan-blue.svg)](https://conan.io/center/span-lite) [![Try it on wandbox](https://img.shields.io/badge/on-wandbox-blue.svg)](https://wandbox.org/permlink/venR3Ko2Q4tlvcVk) [![Try it on godbolt online](https://img.shields.io/badge/on-godbolt-blue.svg)](https://godbolt.org/z/htwpnb) +[![Language](https://img.shields.io/badge/C%2B%2B-98/11/14/17/20-blue.svg)](https://en.wikipedia.org/wiki/C%2B%2B#Standardization) [![License](https://img.shields.io/badge/license-BSL-blue.svg)](https://opensource.org/licenses/BSL-1.0) [![Build Status](https://github.com/martinmoene/span-lite/actions/workflows/ci.yml/badge.svg)](https://github.com/martinmoene/span-lite/actions/workflows/ci.yml) [![Build status](https://ci.appveyor.com/api/projects/status/1ha3wnxtam547m8p?svg=true)](https://ci.appveyor.com/project/martinmoene/span-lite) [![Version](https://badge.fury.io/gh/martinmoene%2Fspan-lite.svg)](https://github.com/martinmoene/span-lite/releases) [![download](https://img.shields.io/badge/latest-download-blue.svg)](https://github.com/martinmoene/span-lite/blob/master/include/nonstd/span.hpp) [![Conan](https://img.shields.io/badge/on-conan-blue.svg)](https://conan.io/center/span-lite) [![Vcpkg](https://img.shields.io/badge/on-vcpkg-blue.svg)](https://vcpkg.link/ports/span-lite) [![Try it on wandbox](https://img.shields.io/badge/on-wandbox-blue.svg)](https://wandbox.org/permlink/venR3Ko2Q4tlvcVk) [![Try it on godbolt online](https://img.shields.io/badge/on-godbolt-blue.svg)](https://godbolt.org/z/htwpnb) **Contents** diff --git a/src/libs/3rdparty/span/span.hpp b/src/libs/3rdparty/span/span.hpp index fa6e51735f9..9a7182f5b0b 100644 --- a/src/libs/3rdparty/span/span.hpp +++ b/src/libs/3rdparty/span/span.hpp @@ -12,8 +12,8 @@ #define NONSTD_SPAN_HPP_INCLUDED #define span_lite_MAJOR 0 -#define span_lite_MINOR 10 -#define span_lite_PATCH 3 +#define span_lite_MINOR 11 +#define span_lite_PATCH 0 #define span_lite_VERSION span_STRINGIFY(span_lite_MAJOR) "." span_STRINGIFY(span_lite_MINOR) "." span_STRINGIFY(span_lite_PATCH) @@ -346,6 +346,7 @@ span_DISABLE_MSVC_WARNINGS( 26439 26440 26472 26473 26481 26490 ) #define span_HAVE_IS_DEFAULT span_CPP11_140 #define span_HAVE_IS_DELETE span_CPP11_140 #define span_HAVE_NOEXCEPT span_CPP11_140 +#define span_HAVE_NORETURN ( span_CPP11_140 && ! span_BETWEEN( span_COMPILER_GNUC_VERSION, 1, 480 ) ) #define span_HAVE_NULLPTR span_CPP11_100 #define span_HAVE_STATIC_ASSERT span_CPP11_100 @@ -357,7 +358,6 @@ span_DISABLE_MSVC_WARNINGS( 26439 26440 26472 26473 26481 26490 ) #define span_HAVE_DEPRECATED span_CPP17_000 #define span_HAVE_NODISCARD span_CPP17_000 -#define span_HAVE_NORETURN span_CPP17_000 // MSVC: template parameter deduction guides since Visual Studio 2017 v15.7 @@ -1870,7 +1870,7 @@ using span_lite::byte_span; #endif // span_FEATURE( BYTE_SPAN ) -#if span_HAVE( STRUCT_BINDING ) +#if !span_USES_STD_SPAN && span_HAVE( STRUCT_BINDING ) #if span_CPP14_OR_GREATER # include @@ -1938,7 +1938,7 @@ span_constexpr ElementType const & get( nonstd::span const } // end namespace std -#endif // span_HAVE( STRUCT_BINDING ) +#endif // !span_USES_STD_SPAN && span_HAVE( STRUCT_BINDING ) #if ! span_USES_STD_SPAN span_RESTORE_WARNINGS() diff --git a/src/libs/utils/span.h b/src/libs/utils/span.h index d21bb9ab00b..f2c545940b7 100644 --- a/src/libs/utils/span.h +++ b/src/libs/utils/span.h @@ -32,7 +32,10 @@ QT_WARNING_PUSH #include <3rdparty/span/span.hpp> namespace Utils { using namespace nonstd; + } +template +inline constexpr bool std::ranges::enable_borrowed_range> = true; QT_WARNING_POP #endif