From 34ab0ac7f0aa5587c1571b1eda8103859b2980f3 Mon Sep 17 00:00:00 2001 From: David Connet Date: Wed, 20 Jul 2022 15:34:30 -0700 Subject: [PATCH] Avoid warnings when combining wxStaticText styles with C++20 Because wxStaticText can contain arbitrary combinations of both alignment and border flags, we need to allow using "|" on them, just as it was done for a few other enums in 3d278ee75f (Avoid warnings about operations on different enums in C++20 mode, 2021-04-25). Closes #22656. (cherry picked from commit 5477d4faa8d34db9b5d8b0b105e2ea550252edde) --- docs/changes.txt | 1 + include/wx/defs.h | 1 + 2 files changed, 2 insertions(+) diff --git a/docs/changes.txt b/docs/changes.txt index 9c4ee7eeb6..e94d34ca3c 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -238,6 +238,7 @@ Changes in behaviour which may result in build errors All (GUI): - Fix grid window scrollbars when freezing part of the grid (#22602). +- Avoid warnings with wxStaticText flags in C++20 (David Connet, #22656). wxGTK: diff --git a/include/wx/defs.h b/include/wx/defs.h index f5511bf1be..06353ce7f2 100644 --- a/include/wx/defs.h +++ b/include/wx/defs.h @@ -1468,6 +1468,7 @@ enum wxBorder wxALLOW_COMBINING_ENUMS(wxAlignment, wxDirection) wxALLOW_COMBINING_ENUMS(wxAlignment, wxGeometryCentre) wxALLOW_COMBINING_ENUMS(wxAlignment, wxStretch) +wxALLOW_COMBINING_ENUMS(wxAlignment, wxBorder) wxALLOW_COMBINING_ENUMS(wxDirection, wxStretch) wxALLOW_COMBINING_ENUMS(wxDirection, wxGeometryCentre)