diff options
Diffstat (limited to 'src/3rdparty/masm/stubs/wtf/Optional.h')
-rw-r--r-- | src/3rdparty/masm/stubs/wtf/Optional.h | 11 |
1 files changed, 11 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 |