From e57d2a0160de3d09254e7b5e528d7d10d733db3d Mon Sep 17 00:00:00 2001 From: "[GPL]Ed" Date: Sat, 2 Sep 2023 08:45:23 +0000 Subject: [PATCH] Fix C++11 build (again) --- src/main.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index fb604e6..f2dd405 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -99,12 +99,18 @@ k = 0; \ } while (0) +namespace std +{ #ifndef __cpp_lib_string_view - namespace std - { typedef std::string const& string_view; - }; #endif +#ifndef __cpp_lib_make_unique + // Thanks, stackoverflow! + template std::unique_ptr + make_unique(Var&&... v) + { return std::unique_ptr(new T(std::forward(v)...)); } +#endif +}; class Array; class WordList;