From 0d20669d3a4a2c70f538c12ffc4e92db17544593 Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Thu, 5 Feb 2026 12:07:20 -0800 Subject: [PATCH] Fix compile for gcc 12 GCC 12 has a bug that evaluated always false branches in templates, leading to an annoying error. This doesn't happen in GCC 13 or Clang. To work around this in GCC 12, we provide a conditional expression that does not depend on the template so GCC 12 is happy. --- common/xnode.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/xnode.cpp b/common/xnode.cpp index 9d6a9318eb..47f6846544 100644 --- a/common/xnode.cpp +++ b/common/xnode.cpp @@ -77,7 +77,7 @@ XATTR::XATTR( const wxString& aName, const VALUE_TYPE& aValue ) : } else { - static_assert( !std::is_same_v, "Missing type handling in XNODE::FormatContents" ); + static_assert( sizeof( T ) == 0, "Missing type handling in XNODE::FormatContents" ); } }, aValue ); }