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>
This commit is contained in:
parent
223fdc7d52
commit
5c01cbfe76
@ -223,7 +223,6 @@
|
||||
but it is not defined on older compilers like C Set 3.1 */
|
||||
#elif defined(__xlC__)
|
||||
# define Q_CC_XLC
|
||||
# define Q_FULL_TEMPLATE_INSTANTIATION
|
||||
# if __xlC__ < 0x400
|
||||
# error "Compiler not supported"
|
||||
# elif __xlC__ >= 0x0600
|
||||
|
@ -100,26 +100,6 @@ template <typename Ptr> inline auto qGetPtrHelper(Ptr &ptr) noexcept -> decltype
|
||||
#define Q_D(Class) Class##Private * const d = d_func()
|
||||
#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:
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user