Skip to content

Commit 8bc29b8

Browse files
Update App.hpp (#1206)
Compatible compile option: /GR-
1 parent be52eb6 commit 8bc29b8

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

azure-pipelines.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,11 +86,11 @@ jobs:
8686
vmImage: "windows-2025"
8787
cli11.std: 20
8888
cli11.options:
89-
-DCMAKE_CXX_FLAGS="/EHsc" -DCLI11_DISABLE_EXTRA_VALIDATORS=1
89+
-DCMAKE_CXX_FLAGS="/EHsc /GR-" -DCLI11_DISABLE_EXTRA_VALIDATORS=1
9090
WindowsLatest:
9191
vmImage: "windows-2025"
9292
cli11.std: 23
93-
cli11.options: -DCMAKE_CXX_FLAGS="/EHsc"
93+
cli11.options: -DCMAKE_CXX_FLAGS="/EHsc /GR-"
9494
Linux17nortti:
9595
vmImage: "ubuntu-latest"
9696
cli11.std: 17

include/CLI/App.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -742,7 +742,7 @@ class App {
742742
auto option_group = std::make_shared<T>(std::move(group_description), group_name, this);
743743
auto *ptr = option_group.get();
744744
// move to App_p for overload resolution on older gcc versions
745-
App_p app_ptr = std::dynamic_pointer_cast<App>(option_group);
745+
App_p app_ptr = std::static_pointer_cast<App>(option_group);
746746
// don't inherit the footer in option groups and clear the help flag by default
747747
app_ptr->footer_ = "";
748748
app_ptr->set_help_flag();

0 commit comments

Comments
 (0)