Fix throwing key_error in util::hash_table for heterogeneous keys
This commit is contained in:
parent
b83a3635fc
commit
c7b1bc0b0a
1 changed files with 2 additions and 2 deletions
|
|
@ -655,7 +655,7 @@ namespace psemek::util
|
||||||
{
|
{
|
||||||
auto it = find(key);
|
auto it = find(key);
|
||||||
if (it == end())
|
if (it == end())
|
||||||
throw util::key_error<Key>(key);
|
throw util::key_error<Key>(Key(key));
|
||||||
return it->second;
|
return it->second;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -672,7 +672,7 @@ namespace psemek::util
|
||||||
{
|
{
|
||||||
auto it = find(key);
|
auto it = find(key);
|
||||||
if (it == end())
|
if (it == end())
|
||||||
throw util::key_error<Key>(key);
|
throw util::key_error<Key>(Key(key));
|
||||||
return it->second;
|
return it->second;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue