From 49b4c439861c89ec311342ea6c06391e717c07f5 Mon Sep 17 00:00:00 2001
From: Florian Schmaus <flow@cs.fau.de>
Date: Wed, 1 Jan 2020 12:45:50 +0100
Subject: [PATCH] Move emper::lib::sync::Semaphore in namespace

to avoid clash with the upcoming emper Semaphore.
---
 emper/lib/sync/Latch.hpp     |  2 +-
 emper/lib/sync/Semaphore.hpp | 11 +++++++++++
 2 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/emper/lib/sync/Latch.hpp b/emper/lib/sync/Latch.hpp
index 04e40e5f..2eb144cd 100644
--- a/emper/lib/sync/Latch.hpp
+++ b/emper/lib/sync/Latch.hpp
@@ -8,7 +8,7 @@ class Latch {
 private:
 	const unsigned int num;
 	std::atomic<unsigned int> counter;
-	Semaphore semaphore;
+	emper::lib::sync::Semaphore semaphore;
 
 public:
 	Latch(unsigned int counter) : num(counter), counter(counter), semaphore(0) {
diff --git a/emper/lib/sync/Semaphore.hpp b/emper/lib/sync/Semaphore.hpp
index a8653daa..46be64ec 100644
--- a/emper/lib/sync/Semaphore.hpp
+++ b/emper/lib/sync/Semaphore.hpp
@@ -3,6 +3,12 @@
 #include <mutex>
 #include <condition_variable>
 
+namespace emper {
+
+namespace lib {
+
+namespace sync {
+
 class Semaphore {
 private:
 	std::mutex m;
@@ -32,3 +38,8 @@ public:
 	}
 };
 
+}
+
+}
+
+}
-- 
GitLab