fix: Use stable_partition for deterministic ordering

This commit is contained in:
lazysegtree 2026-01-12 20:21:33 +05:30
parent c9dfa286a2
commit 328445c947
1 changed files with 1 additions and 1 deletions

View File

@ -2339,7 +2339,7 @@ OptionAdder::operator()
// (length-1) and longer names
std::string short_name {""};
auto first_short_name_iter =
std::partition(option_names.begin(), option_names.end(),
std::stable_partition(option_names.begin(), option_names.end(),
[&](const std::string& name) { return name.length() > 1; }
);
auto num_length_1_names = (option_names.end() - first_short_name_iter);