diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 6d18b58a..1ad5890e 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -86,11 +86,11 @@ jobs: vmImage: "windows-2025" cli11.std: 20 cli11.options: - -DCMAKE_CXX_FLAGS="/EHsc" -DCLI11_DISABLE_EXTRA_VALIDATORS=1 + -DCMAKE_CXX_FLAGS="/EHsc /GR-" -DCLI11_DISABLE_EXTRA_VALIDATORS=1 WindowsLatest: vmImage: "windows-2025" cli11.std: 23 - cli11.options: -DCMAKE_CXX_FLAGS="/EHsc" + cli11.options: -DCMAKE_CXX_FLAGS="/EHsc /GR-" Linux17nortti: vmImage: "ubuntu-latest" cli11.std: 17 diff --git a/include/CLI/App.hpp b/include/CLI/App.hpp index 19da3024..d35e9b9d 100644 --- a/include/CLI/App.hpp +++ b/include/CLI/App.hpp @@ -742,7 +742,7 @@ class App { auto option_group = std::make_shared(std::move(group_description), group_name, this); auto *ptr = option_group.get(); // move to App_p for overload resolution on older gcc versions - App_p app_ptr = std::dynamic_pointer_cast(option_group); + App_p app_ptr = std::static_pointer_cast(option_group); // don't inherit the footer in option groups and clear the help flag by default app_ptr->footer_ = ""; app_ptr->set_help_flag();