aboutsummaryrefslogtreecommitdiff
path: root/src/openvic/types/IdentifierRegistry.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/openvic/types/IdentifierRegistry.hpp')
-rw-r--r--src/openvic/types/IdentifierRegistry.hpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/openvic/types/IdentifierRegistry.hpp b/src/openvic/types/IdentifierRegistry.hpp
index 989db01..54b466e 100644
--- a/src/openvic/types/IdentifierRegistry.hpp
+++ b/src/openvic/types/IdentifierRegistry.hpp
@@ -1,7 +1,6 @@
#pragma once
#include <map>
-#include <unordered_map>
#include <vector>
#include "openvic/types/Colour.hpp"
@@ -46,7 +45,6 @@ namespace OpenVic {
colour_t get_colour() const;
std::string colour_to_hex_string() const;
- static std::string colour_to_hex_string(colour_t const colour);
};
/*
@@ -74,7 +72,8 @@ namespace OpenVic {
* the type of object that the registry will store, and the second part ensures
* that HasIdentifier is a base class of T.
*/
- template<class T, typename std::enable_if<std::is_base_of<HasIdentifier, T>::value>::type* = nullptr>
+ template<typename T>
+ requires(std::derived_from<T, HasIdentifier>)
class IdentifierRegistry {
using identifier_index_map_t = std::map<std::string, size_t, std::less<void>>;