From ec2fb375501c217a5893f366ae5d49f9ce45db29 Mon Sep 17 00:00:00 2001 From: Pursche Date: Tue, 11 Aug 2026 17:50:18 +0200 Subject: [PATCH] Fix GCC build: avoid default member initializers in PersistedBindingOverride GCC rejects a nested type's default member initializers when a member declaration of the enclosing class needs them before the class is complete (gcc bug 96645) - here the robin_hood map member instantiates std::array's default constructor. Clang and MSVC both accept this. Initialize via the constructor instead; semantics unchanged. --- Source/Game-Lib/Game-Lib/Input/InputActionSystem.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Source/Game-Lib/Game-Lib/Input/InputActionSystem.h b/Source/Game-Lib/Game-Lib/Input/InputActionSystem.h index 500fe7f4..8b5a0778 100644 --- a/Source/Game-Lib/Game-Lib/Input/InputActionSystem.h +++ b/Source/Game-Lib/Game-Lib/Input/InputActionSystem.h @@ -368,8 +368,13 @@ class InputActionSystem struct PersistedBindingOverride { public: + // GCC rejects default member initializers on nested types when a member of the + // enclosing class needs them before the class is complete (gcc bug 96645), so + // initialize via the constructor instead + PersistedBindingOverride() : present(false) {} + std::optional binding; - bool present = false; + bool present; }; using PersistedActionOverrides = std::array;