diff options
author | Hop311 <Hop3114@gmail.com> | 2024-09-20 14:17:58 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-20 14:17:58 +0200 |
commit | 7fe8ba2b3bd3bafad374a691280bbf5102b58678 (patch) | |
tree | 0b55b428680843e033ed07bd8c7e54eb4456f751 /src/openvic-simulation/types | |
parent | 89b1333b1edff6c08750bd836ae92eccbe06e3bd (diff) | |
parent | 00a3121dd43a3b6e8f5a6efa2d3b6560ef78c370 (diff) |
Merge pull request #202 from OpenVicProject/issue-modifier
Allow Issue to inherit Modifier directly
Diffstat (limited to 'src/openvic-simulation/types')
-rw-r--r-- | src/openvic-simulation/types/HasIdentifier.hpp | 3 | ||||
-rw-r--r-- | src/openvic-simulation/types/IndexedMap.hpp | 2 |
2 files changed, 5 insertions, 0 deletions
diff --git a/src/openvic-simulation/types/HasIdentifier.hpp b/src/openvic-simulation/types/HasIdentifier.hpp index 74961e3..bbd9771 100644 --- a/src/openvic-simulation/types/HasIdentifier.hpp +++ b/src/openvic-simulation/types/HasIdentifier.hpp @@ -102,6 +102,9 @@ namespace OpenVic { using HasIdentifierAndColour = _HasIdentifierAndColour<colour_t>; using HasIdentifierAndAlphaColour = _HasIdentifierAndColour<colour_argb_t>; + template<typename T> + concept HasGetIdentifierAndGetColour = HasGetIdentifier<T> && HasGetColour<T>; + template<std::unsigned_integral T = size_t> class HasIndex { public: diff --git a/src/openvic-simulation/types/IndexedMap.hpp b/src/openvic-simulation/types/IndexedMap.hpp index 5682c0e..73ff313 100644 --- a/src/openvic-simulation/types/IndexedMap.hpp +++ b/src/openvic-simulation/types/IndexedMap.hpp @@ -18,6 +18,8 @@ namespace OpenVic { using value_const_ref_t = container_t::const_reference; using keys_t = std::vector<key_t>; + using key_type = key_t; // To match tsl::ordered_map's key_type + using container_t::operator[]; using container_t::size; using container_t::begin; |