Skip to content

Fix IntelliSense/MSVC errors and guard wxApp exception overrides#1326

Closed
PeramatoG wants to merge 1 commit intomainfrom
codex/fix-compilation-errors-in-perastage-afu4ym
Closed

Fix IntelliSense/MSVC errors and guard wxApp exception overrides#1326
PeramatoG wants to merge 1 commit intomainfrom
codex/fix-compilation-errors-in-perastage-afu4ym

Conversation

@PeramatoG
Copy link
Copy Markdown
Owner

Motivation

  • Resolve Visual Studio/IntelliSense parse errors where std::optional appears missing and cascading syntax errors caused by MSVC using a lower language mode.
  • Avoid invalid override diagnostics for wxApp exception hooks on builds where wxWidgets disables exception support.

Description

  • Add MSVC-specific compile option /std:c++20 via target_compile_options in CMakeLists.txt to enforce C++20 language mode for Visual Studio and align IntelliSense with cxx_std_20.
  • Wrap MyApp::OnExceptionInMainLoop and MyApp::OnUnhandledException declarations and definitions in main.cpp with #if wxUSE_EXCEPTIONS so the override specifier is only present when wx exception hooks are enabled.
  • Modified files: CMakeLists.txt and main.cpp.

Testing

  • Ran tests/check_perastage_tree_modules.sh and it passed (OK).
  • Ran tests/check_no_configmanager_get_in_gui.sh and it passed (OK).
  • Attempted cmake -S . -B build && cmake --build build -j4 but a full local build could not complete in this environment due to missing wxWidgets development packages, so full compile/link validation was not performed.

Codex Task

@PeramatoG PeramatoG closed this Mar 29, 2026
@PeramatoG PeramatoG deleted the codex/fix-compilation-errors-in-perastage-afu4ym branch March 29, 2026 01:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant