diff options
author | Sona Kurazyan <sona.kurazyan@qt.io> | 2022-08-19 17:24:37 +0200 |
---|---|---|
committer | Sona Kurazyan <sona.kurazyan@qt.io> | 2022-08-30 20:36:14 +0200 |
commit | 5c01cbfe7670ef2d4d0267e0cd114ab02c390042 (patch) | |
tree | 4ee44103d559ae65c54f240cb95d591f579f47e9 /src/corelib/global/qtclasshelpermacros.h | |
parent | 223fdc7d52665b2fab24c0624b969bfdab067a2f (diff) |
Remove Q_DUMMY_COMPARISON_OPERATOR
It's not needed for any of our supported compilers and isn't used in
Qt codbase anymore. It was only required for IBM xlC compiler, which
doesn't seem to support C++17 at the moment (when it does, hopefully
they will also fix the issue).
[ChangeLog][QtGlobal] Removed the Q_DUMMY_COMPARISON_OPERATOR macro,
which was needed to workaround outdated template instantiation rules
on some outdated compilers.
Fixes: QTBUG-105098
Change-Id: I2b992dd8c0f389d874d2a8521fc1a1aad3f80699
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/corelib/global/qtclasshelpermacros.h')
-rw-r--r-- | src/corelib/global/qtclasshelpermacros.h | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/src/corelib/global/qtclasshelpermacros.h b/src/corelib/global/qtclasshelpermacros.h index 6e72b0f7c1..e6b66ed5f2 100644 --- a/src/corelib/global/qtclasshelpermacros.h +++ b/src/corelib/global/qtclasshelpermacros.h @@ -101,26 +101,6 @@ template <typename Ptr> inline auto qGetPtrHelper(Ptr &ptr) noexcept -> decltype #define Q_Q(Class) Class * const q = q_func() /* - Compilers which follow outdated template instantiation rules - require a class to have a comparison operator to exist when - a QList of this type is instantiated. It's not actually - used in the list, though. Hence the dummy implementation. - Just in case other code relies on it we better trigger a warning - mandating a real implementation. -*/ - -#ifdef Q_FULL_TEMPLATE_INSTANTIATION -# define Q_DUMMY_COMPARISON_OPERATOR(C) \ - bool operator==(const C&) const { \ - qWarning(#C"::operator==(const "#C"&) was called"); \ - return false; \ - } -#else - -# define Q_DUMMY_COMPARISON_OPERATOR(C) -#endif - -/* Specialize a shared type with: Q_DECLARE_SHARED(type) |