Update App.hpp (#1206)

Compatible compile option: /GR-
This commit is contained in:
romanholidaypancakes
2025-09-15 20:52:01 +08:00
committed by GitHub
parent be52eb6972
commit 8bc29b83e9
2 changed files with 3 additions and 3 deletions

View File

@@ -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

View File

@@ -742,7 +742,7 @@ class App {
auto option_group = std::make_shared<T>(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<App>(option_group);
App_p app_ptr = std::static_pointer_cast<App>(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();