# # # patch "option.cc" # from [00a03c5eea5c4c3303ddcdfe73e0bb2e4e1013a6] # to [a7ab569db1b556b73b5290540a1fb1102cb8e3e7] # ============================================================ --- option.cc 00a03c5eea5c4c3303ddcdfe73e0bb2e4e1013a6 +++ option.cc a7ab569db1b556b73b5290540a1fb1102cb8e3e7 @@ -284,6 +284,11 @@ getopt(map cons throw unknown_option(name); } +// helper for get_by_name +// Make sure that either: +// * There are no duplicate options, or +// * If we're only parsing options (and not applying them), any duplicates +// are consistent WRT whether they take an option typedef pair::iterator, bool> by_name_res_type; static void check_by_name_insertion(by_name_res_type const & res, concrete_option const & opt, @@ -307,6 +312,7 @@ static void check_by_name_insertion(by_n } } +// generate an index that lets us look options up by name static map get_by_name(std::set const & options, concrete_option_set::option_parse_type ty)