From 759174ed5712ffc8ccd83cdf056c8c5a21abb4b3 Mon Sep 17 00:00:00 2001
From: Patrick Wuttke
Date: Sat, 22 Nov 2025 12:42:19 +0100
Subject: [PATCH] Added static tests for detect_or_t.
---
source/mijin/util/traits.hpp | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/source/mijin/util/traits.hpp b/source/mijin/util/traits.hpp
index 67426f9..5a8ce3d 100644
--- a/source/mijin/util/traits.hpp
+++ b/source/mijin/util/traits.hpp
@@ -300,6 +300,19 @@ static_assert(union_type, MyTemplate, MyTem
static_assert(!union_type);
static_assert(union_type>);
static_assert(!union_type>);
+
+struct DetectNo {};
+struct DetectYes {
+ using some_type = double;
+};
+template
+using detect_some_type = typename T::some_type;
+
+template
+using some_type = detect_or_t;
+
+static_assert(std::is_same_v, int>);
+static_assert(std::is_same_v, double>);
}
#endif