diff --git a/libsolutil/CMakeLists.txt b/libsolutil/CMakeLists.txt
index 7c10cf8b5..535b2b90f 100644
--- a/libsolutil/CMakeLists.txt
+++ b/libsolutil/CMakeLists.txt
@@ -8,6 +8,7 @@ set(sources
CommonData.h
CommonIO.cpp
CommonIO.h
+ cxx20.h
Exceptions.cpp
Exceptions.h
ErrorCodes.h
@@ -15,7 +16,6 @@ set(sources
FunctionSelector.h
IndentedWriter.cpp
IndentedWriter.h
- InvertibleMap.h
IpfsHash.cpp
IpfsHash.h
JSON.cpp
diff --git a/libsolutil/InvertibleMap.h b/libsolutil/InvertibleMap.h
deleted file mode 100644
index 882890df5..000000000
--- a/libsolutil/InvertibleMap.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- This file is part of solidity.
-
- solidity is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- solidity is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with solidity. If not, see .
-*/
-// SPDX-License-Identifier: GPL-3.0
-
-#pragma once
-
-#include
-
-/**
- * Data structure that keeps track of values and keys of a mapping.
- */
-template
-struct InvertibleMap
-{
- std::unordered_map values;
-
- void set(K _key, V _value)
- {
- values[_key] = _value;
- }
-
- std::optional fetch(K _key)
- {
- auto it = values.find(_key);
- if (it == values.end())
- return std::nullopt;
- else
- return it->second;
- }
-
- void eraseKey(K _key)
- {
- values.erase(_key);
- }
-
- void eraseValue(V _value)
- {
- auto it = values.begin();
- while (it != values.end())
- {
- if (it->second == _value)
- it = values.erase(it);
- else
- ++it;
- }
- }
-
- void clear()
- {
- values.clear();
- }
-};
diff --git a/libsolutil/cxx20.h b/libsolutil/cxx20.h
new file mode 100644
index 000000000..69e09a005
--- /dev/null
+++ b/libsolutil/cxx20.h
@@ -0,0 +1,52 @@
+/*
+ This file is part of solidity.
+
+ solidity is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ solidity is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with solidity. If not, see .
+*/
+// SPDX-License-Identifier: GPL-3.0
+
+#include