diff options
author | Hop311 <Hop3114@gmail.com> | 2024-01-25 22:12:26 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-25 22:12:26 +0100 |
commit | be24f8d1871b318ee241c03f6722ad2394a820f2 (patch) | |
tree | 97a1bff45f91d4b02ef62c4dd9a8e584699e5fdd /src/openvic-simulation/utility | |
parent | 3e2ee2cd3553cb0a5949d7a34c5ef2f10ff5c949 (diff) | |
parent | 14ba9531d118fab87b360db4aae765807fca3cec (diff) |
Merge pull request #140 from OpenVicProject/case-rework
Added StringMapCase and case insensitive expect_dictionary_keys
Diffstat (limited to 'src/openvic-simulation/utility')
-rw-r--r-- | src/openvic-simulation/utility/Utility.hpp | 8 |
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 |