Skip to content

Conversation

@FabianThomsen
Copy link
Member

@FabianThomsen FabianThomsen commented Jun 22, 2023

As Model::operator() doesn't change the model itself, it should be declared const.
For this to work, we cannot use std::unordererd_map::operator[](Key & key), inside it, because that would insert a new value if, the key didn't exist. As alternative, we can use std::unordered_map::find(Key & key), which would throw if the key didn't exist - a behavior that also seems more intuitive to me.

@lreiher lreiher merged commit a3c3aaa into ika-rwth-aachen:main Jun 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants