diff options
Diffstat (limited to 'src/3rdparty')
-rw-r--r-- | src/3rdparty/masm/stubs/wtf/Optional.h | 11 | ||||
-rw-r--r-- | src/3rdparty/masm/wtf/FilePrintStream.cpp | 1 |
2 files changed, 12 insertions, 0 deletions
diff --git a/src/3rdparty/masm/stubs/wtf/Optional.h b/src/3rdparty/masm/stubs/wtf/Optional.h index 44fa3ee62d..235730a87d 100644 --- a/src/3rdparty/masm/stubs/wtf/Optional.h +++ b/src/3rdparty/masm/stubs/wtf/Optional.h @@ -41,6 +41,7 @@ #include <QtCore/qglobal.h> +#include <memory> #if __cplusplus > 201402L && QT_HAS_INCLUDE(<optional>) #include <optional> #else @@ -81,3 +82,13 @@ private: } #endif + +#if __cplusplus < 201402L && !defined(__cpp_lib_make_unique) && !defined(Q_CC_MSVC) && !defined(Q_CC_GHS) + +namespace std { + template<typename T, class ...Args> + unique_ptr<T> make_unique(Args &&...args) + { return unique_ptr<T>(new T(std::forward<Args>(args)...)); } +} + +#endif diff --git a/src/3rdparty/masm/wtf/FilePrintStream.cpp b/src/3rdparty/masm/wtf/FilePrintStream.cpp index 28714ecb6f..a56b36526e 100644 --- a/src/3rdparty/masm/wtf/FilePrintStream.cpp +++ b/src/3rdparty/masm/wtf/FilePrintStream.cpp @@ -25,6 +25,7 @@ #include "config.h" #include "FilePrintStream.h" +#include "Optional.h" // for make_unique polyfill if required namespace WTF { |