- auto option_array = shared_ptr<const struct sr_option *>(
- options, sr_output_options_free);
- for (int i = 0; options[i]; i++)
- result[options[i]->id] = shared_ptr<Option>(
- new Option(options[i], option_array), Option::Deleter());
+ shared_ptr<const struct sr_option *> option_array
+ {options, &sr_output_options_free};
+ for (int i = 0; options[i]; i++) {
+ shared_ptr<Option> opt {
+ new Option{options[i], option_array},
+ default_delete<Option>{}};
+ result.emplace(opt->id(), move(opt));
+ }