Closed atgeirr closed 1 month ago
This is not supported until C++20, and at least for clang on mac, is not yet supported in OpenMP:
/Users/atgeirr/opm/src/opm-grid/opm/grid/common/MetisPartition.cpp:111:112: warning: captured structured bindings are a C++20 extension [-Wc++20-extensions] } else if (std::any_of(metisOptionKeysForOtherMethods.begin(), metisOptionKeysForOtherMethods.end(), [&key](const std::string& otherKey) { return otherKey == key; })) { ^ /Users/atgeirr/opm/src/opm-grid/opm/grid/common/MetisPartition.cpp:95:23: note: 'key' declared here for (const auto& [key,value] : optionsMap) { ^ /Users/atgeirr/opm/src/opm-grid/opm/grid/common/MetisPartition.cpp:111:112: error: capturing a structured binding is not yet supported in OpenMP } else if (std::any_of(metisOptionKeysForOtherMethods.begin(), metisOptionKeysForOtherMethods.end(), [&key](const std::string& otherKey) { return otherKey == key; })) { ^ /Users/atgeirr/opm/src/opm-grid/opm/grid/common/MetisPartition.cpp:95:23: note: 'key' declared here for (const auto& [key,value] : optionsMap) {
I replaced the std::any_of() with calling the count() function of the set, which is simpler in any case (contains() is not yet available).
Also improve formatting nearby avoiding overlong lines.
jenkins build this please
This is not supported until C++20, and at least for clang on mac, is not yet supported in OpenMP:
I replaced the std::any_of() with calling the count() function of the set, which is simpler in any case (contains() is not yet available).
Also improve formatting nearby avoiding overlong lines.