From b9130dc84b6aa687a7d96ada9aed91fd6e13b6cd Mon Sep 17 00:00:00 2001
From: Florian Fischer <florian.fischer@muhq.space>
Date: Tue, 12 Jul 2022 13:16:49 +0200
Subject: [PATCH] [Semaphore] make default constructor more explicit

The CancelFutureTest fails for libc++ because it uses two
emper::Semaphores to coordinate the involved fibers.

Using gcc and stdlibc++ the default constructor initialized the
semaphore count to 0.

The default constructor using clang and libc++ does not initialize the
semaphore count member and thus causing the CancelFutureTest to misbehave.
---
 emper/Semaphore.hpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/emper/Semaphore.hpp b/emper/Semaphore.hpp
index f703c5d1..eb77a7f6 100644
--- a/emper/Semaphore.hpp
+++ b/emper/Semaphore.hpp
@@ -17,7 +17,7 @@ class Semaphore {
 	std::mutex mutex;
 
  public:
-	Semaphore() = default;
+	Semaphore() : Semaphore(0){};
 	Semaphore(unsigned int count) : count(count){};
 
 	auto acquire() -> bool {
-- 
GitLab