summaryrefslogtreecommitdiff
path: root/util.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'util.hpp')
-rw-r--r--util.hpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/util.hpp b/util.hpp
index 5b90220..0a93343 100644
--- a/util.hpp
+++ b/util.hpp
@@ -11,6 +11,16 @@
#include <regex>
#include <mutex>
#include <condition_variable>
+#include <optional>
+#include <type_traits>
+
+namespace util {
+template<typename T>
+struct is_optional : ::std::false_type {};
+
+template<typename T>
+struct is_optional<::std::optional<T>> : ::std::true_type {};
+}
class Semaphore {
public: