Files
wxWidgets/include
Vadim Zeitlin 6efd3b4438 Fix -Wnoexcept from gcc 10.3 in STL build
Add more wxNOEXCEPT to hash-related classes to avoid warnings like

.../c++/bits/hashtable_policy.h: In instantiation of ‘std::__detail::_Hashtable_ebo_helper<_Nm, _Tp, true>::_Hashtable_ebo_helper() [with int _Nm = 1; _Tp = wxStringHash]’:
include/wx/clntdata.h:33:22:   recursively required from ‘std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map() [with _Key = wxString; _Tp = int (*)(void*, void*); _Hash = wxStringHash; _Pred = wxStringEqual; _Alloc = std::allocator<std::pair<const wxString, int (*)(void*, void*)> >]’
include/wx/clntdata.h:33:22:   required from here
.../c++/bits/hashtable_policy.h:1112:40: error: noexcept-expression evaluates to ‘false’ because of a call to ‘wxStringHash::wxStringHash()’ [-Werror=noexcept]
 1112 |       _Hashtable_ebo_helper() noexcept(noexcept(_Tp())) : _Tp() { }
      |                                        ^~~~~~~~~~~~~~~
In file included from include/wx/clntdata.h:16,
                 from include/wx/event.h:17,
                 from include/wx/evtloop.h:14,
                 from tests/testprec.h:5,
                 from tests/allheaders.cpp:410:
include/wx/hashmap.h:568:5: note: but ‘wxStringHash::wxStringHash()’ does not throw; perhaps it should be declared ‘noexcept’
  568 |     wxStringHash() {}
      |     ^~~~~~~~~~~~

that started to be given my MinGW x86-64 10.3.9 (although they were not
given by 10.2.1 version of the same compiler).

But adding wxNOEXCEPT here is more consistent with the changes of
7d74df9a03 (Add wxNOEXCEPT to the hash structs operator() declarations,
2020-08-30) and makes sense anyhow.
2022-02-18 17:02:10 +01:00
..