163 std::unordered_set<std::string> opts_to_remove;
164 std::unordered_set<std::string> unsupported_mandatory_options;
165 std::unordered_set<std::string> unsupported_optional_options;
167 for (
auto it = opts.begin(); it != opts.end();)
169 std::string &name = it->ref(0);
175 name.erase(name.begin());
182 name.erase(name.begin());
189 unsupported_optional_options.insert(name);
193 unsupported_mandatory_options.insert(name);
200 opts_to_remove.insert(name);
208 opts_to_remove.insert(name);
216 erase(std::remove_if(begin(), end(), [&opts_to_remove](
const Option &o)
218 const std::string &name = o.
ref(0);
219 return opts_to_remove.contains(name); }),
224 update_list.insert(opts_to_remove.begin(), opts_to_remove.end());
226 if (!unsupported_mandatory_options.empty())
228 throw push_update_unsupported_option(
string::join(unsupported_mandatory_options,
","));
231 if (!unsupported_optional_options.empty())