mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Workaround for clang 5.0.0 on Ubuntu Trusty in Travis CI failing to compile a structural binding
clang fails with: /home/travis/build/ethereum/solidity/libsolutil/CommonData.h:167:19: error: unused variable '' [-Werror,-Wunused-variable] for (auto const& [key, value]: originalMap)
This commit is contained in:
parent
5fbc4d4afa
commit
c4f8df3272
@ -164,10 +164,10 @@ template <typename K, typename V>
|
||||
std::map<V, K> invertMap(std::map<K, V> const& originalMap)
|
||||
{
|
||||
std::map<V, K> inverseMap;
|
||||
for (auto const& [key, value]: originalMap)
|
||||
for (auto const& originalPair: originalMap)
|
||||
{
|
||||
assert(inverseMap.count(value) == 0);
|
||||
inverseMap.insert({value, key});
|
||||
assert(inverseMap.count(originalPair.second) == 0);
|
||||
inverseMap.insert({originalPair.second, originalPair.first});
|
||||
}
|
||||
|
||||
return inverseMap;
|
||||
|
Loading…
Reference in New Issue
Block a user