Merge branch 'no-global-ops'

Don't define operators for wx types in global scope.

This results in much better error messages when the compiler gives an
error about failing to resolve a call to some operator in user code
because it doesn't list all the wx-defined operators as candidates. In
practice, this cuts down error messages from 500 (!) lines to 2 with
gcc.

See #24190.
This commit is contained in:
Vadim Zeitlin 2024-01-12 18:39:30 +01:00
commit a2f7a933e8
28 changed files with 1074 additions and 1002 deletions

View file

@ -119,6 +119,12 @@ Changes in behaviour which may result in build errors
compatible with the previous wxWidgets versions, but now compare values, and
not pointers, in their Index() member function.
- All operators (e.g. "==", "+", etc) on wx types are not defined in global
scope any more, resulting in much better error messages but also preventing
them from implicitly being used with types convertible to wx types. If you
really need to use these operators with your own types, please use explicit
conversions.
- Due to the possibility to construct wxString from std::string_view some
previously valid code, such as "wxstr = {"Hello", 2}", is now ambiguous.
Please use explicit class name, e.g. "wxstr = wxString{"Hello", 2}" to