forked from qt-creator/qt-creator
Utils: Fix build on macOS < 13 with C++20
The Clang implementation of span is incomplete until LLVM 15 / Xcode 15 / macOS 13.5 Change-Id: Iac8514fc84643cb4dae9cfaac603df5e798f9ff4 Reviewed-by: Marco Bubke <marco.bubke@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
@@ -5,7 +5,9 @@
|
||||
|
||||
#include <qcompilerdetection.h>
|
||||
|
||||
#if __cplusplus >= 202002L
|
||||
// The (Apple) Clang implementation of span is incomplete until LLVM 15 / Xcode 14.3 / macOS 13
|
||||
#if __cplusplus >= 202002L \
|
||||
&& !(defined(__apple_build_version__) && __apple_build_version__ < 14030022)
|
||||
#include <span>
|
||||
|
||||
namespace Utils {
|
||||
@@ -22,6 +24,11 @@ QT_WARNING_PUSH
|
||||
#elif defined(Q_CC_GNU) || defined(Q_CC_CLANG)
|
||||
#pragma GCC system_header
|
||||
#endif
|
||||
|
||||
// disable automatic usage of std::span in span-lite
|
||||
// since we make that decision ourselves at the top of this header
|
||||
#define span_CONFIG_SELECT_SPAN span_SPAN_NONSTD
|
||||
|
||||
#include <3rdparty/span/span.hpp>
|
||||
namespace Utils {
|
||||
using namespace nonstd;
|
||||
|
Reference in New Issue
Block a user