From 8639be0514272895375ad215262692125ad96e66 Mon Sep 17 00:00:00 2001
From: Tobias Frisch <tfrisch@uni-koblenz.de>
Date: Tue, 28 Sep 2021 18:56:21 +0200
Subject: [PATCH] Hotfix for MinGW and older GCC

Signed-off-by: Tobias Frisch <tfrisch@uni-koblenz.de>
---
 CMakeLists.txt         | 4 ++++
 include/vkcv/Event.hpp | 7 +++++--
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 384d2d96..22eb2291 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -42,6 +42,10 @@ if (vkcv_build_debug)
 	endif()
 endif()
 
+if ((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "10.0.0"))
+	set(vkcv_flags ${vkcv_flags} " -std=c++2a")
+endif()
+
 # configure everything to use the required dependencies
 include(${vkcv_config}/Libraries.cmake)
 
diff --git a/include/vkcv/Event.hpp b/include/vkcv/Event.hpp
index a17de572..edb8131a 100644
--- a/include/vkcv/Event.hpp
+++ b/include/vkcv/Event.hpp
@@ -97,8 +97,11 @@ namespace vkcv {
 #endif
         }
 
-        explicit event(bool locked = false) :
-		m_semaphore(locked? 1 : 0) {}
+        explicit event(bool locked = false)
+#ifndef __MINGW32__
+		: m_semaphore(locked? 1 : 0)
+#endif
+		{}
 
         event(const event &other) = delete;
 
-- 
GitLab