From 8bc29b83e9111bfb30191a5c7bbf8846c4d95e7c Mon Sep 17 00:00:00 2001 From: romanholidaypancakes <51652878+romanholidaypancakes@users.noreply.github.com> Date: Mon, 15 Sep 2025 20:52:01 +0800 Subject: [PATCH] Update App.hpp (#1206) Compatible compile option: /GR- --- azure-pipelines.yml | 4 ++-- include/CLI/App.hpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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();