aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/utility/Utility.hpp
diff options
context:
space:
mode:
author hop311 <hop3114@gmail.com>2024-01-25 00:28:09 +0100
committer hop311 <hop3114@gmail.com>2024-01-25 21:31:04 +0100
commit14ba9531d118fab87b360db4aae765807fca3cec (patch)
tree97a1bff45f91d4b02ef62c4dd9a8e584699e5fdd /src/openvic-simulation/utility/Utility.hpp
parent3e2ee2cd3553cb0a5949d7a34c5ef2f10ff5c949 (diff)
Added StringMapCase and case insensitive expect_dictionary_keyscase-rework
Diffstat (limited to 'src/openvic-simulation/utility/Utility.hpp')
-rw-r--r--src/openvic-simulation/utility/Utility.hpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/openvic-simulation/utility/Utility.hpp b/src/openvic-simulation/utility/Utility.hpp
index 9951532..8180e55 100644
--- a/src/openvic-simulation/utility/Utility.hpp
+++ b/src/openvic-simulation/utility/Utility.hpp
@@ -81,6 +81,14 @@ namespace OpenVic::utility {
template<typename T, template<typename...> class Z>
inline constexpr bool is_specialization_of_v = is_specialization_of<T, Z>::value;
+ template <template<typename...> class Template, typename... Args>
+ void _derived_from_specialization_impl(const Template<Args...>&);
+
+ template <typename T, template<typename...> class Template>
+ concept is_derived_from_specialization_of = requires(const T& t) {
+ _derived_from_specialization_impl<Template>(t);
+ };
+
inline constexpr auto three_way(auto&& left, auto&& right) {
// This is Apple's fault again
#if __cpp_lib_three_way_comparison >= 201907L