Skip to content

Commit b429175

Browse files
phlptphenryiii
authored andcommitted
the get_option_group definition was missing from the splitting of the calls.
1 parent 4dbe4b4 commit b429175

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

include/CLI/impl/App_inl.hpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -433,6 +433,15 @@ CLI11_NODISCARD CLI11_INLINE CLI::App_p App::get_subcommand_ptr(int index) const
433433
throw OptionNotFound(std::to_string(index));
434434
}
435435

436+
CLI11_NODISCARD CLI11_INLINE CLI::App *App::get_option_group(std::string group_name) const {
437+
for(const App_p &app : subcommands_) {
438+
if(app->name_.empty() && app->group_ == group_name) {
439+
return app.get();
440+
}
441+
}
442+
throw OptionNotFound(group_name);
443+
}
444+
436445
CLI11_NODISCARD CLI11_INLINE std::size_t App::count_all() const {
437446
std::size_t cnt{0};
438447
for(const auto &opt : options_) {

0 commit comments

Comments
 (0)