diff options
-rw-r--r-- | src/3rdparty/masm/stubs/wtf/Optional.h | 3 | ||||
-rw-r--r-- | src/qml/configure.json | 18 |
2 files changed, 20 insertions, 1 deletions
diff --git a/src/3rdparty/masm/stubs/wtf/Optional.h b/src/3rdparty/masm/stubs/wtf/Optional.h index 235730a87d..fdb7de51ce 100644 --- a/src/3rdparty/masm/stubs/wtf/Optional.h +++ b/src/3rdparty/masm/stubs/wtf/Optional.h @@ -40,6 +40,7 @@ #pragma once #include <QtCore/qglobal.h> +#include <QtQml/private/qtqmlglobal_p.h> #include <memory> #if __cplusplus > 201402L && QT_HAS_INCLUDE(<optional>) @@ -83,7 +84,7 @@ private: #endif -#if __cplusplus < 201402L && !defined(__cpp_lib_make_unique) && !defined(Q_CC_MSVC) && !defined(Q_CC_GHS) +#if __cplusplus < 201402L && !QT_CONFIG(cxx14_make_unique) namespace std { template<typename T, class ...Args> diff --git a/src/qml/configure.json b/src/qml/configure.json index aea62c3439..878ec0119b 100644 --- a/src/qml/configure.json +++ b/src/qml/configure.json @@ -12,7 +12,25 @@ } }, + "tests": { + "cxx14_make_unique": { + "label": "C++14 make_unique()", + "type": "compile", + "test": { + "include": "memory", + "main": [ + "std::unique_ptr<int> ptr = std::make_unique<int>();" + ] + } + } + }, + "features": { + "cxx14_make_unique": { + "label": "C++14 make_unique", + "condition": "tests.cxx14_make_unique", + "output": [ "privateFeature" ] + }, "qml-network": { "label": "QML network support", "purpose": "Provides network transparency.", |