Utils: Update span

The last snapshot had probems with ranges.

Change-Id: I338c4d7a5d82fd65d4500cebec605a4652de0c1c
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
Marco Bubke
2024-09-24 11:19:54 +02:00
committed by Tim Jenssen
parent fa8b156795
commit 6068df5540
4 changed files with 10 additions and 6 deletions

View File

@@ -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"

View File

@@ -1,7 +1,7 @@
<a id="top"></a>
# 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**

View File

@@ -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 <tuple>
@@ -1938,7 +1938,7 @@ span_constexpr ElementType const & get( nonstd::span<ElementType, Extent> 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()

View File

@@ -32,7 +32,10 @@ QT_WARNING_PUSH
#include <3rdparty/span/span.hpp>
namespace Utils {
using namespace nonstd;
}
template<typename T, std::size_t N>
inline constexpr bool std::ranges::enable_borrowed_range<Utils::span<T, N>> = true;
QT_WARNING_POP
#endif