From 45d592deb685e106e20933502bbecda04ab73d75 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Thu, 1 Jan 2026 19:03:47 +0900 Subject: Remove usage of TQ_FULL_TEMPLATE_INSTANTIATION and TQ_DUMMY_COMPARISON_OPERATOR. The #defines were used for some very old compilers which had issues with template instantiation. We are now using c++17 compilers, so this is unnecessary. Signed-off-by: Michele Calgaro --- src/tools/tqglobal.h | 28 +--------------------------- src/tools/tqmap.h | 7 ------- 2 files changed, 1 insertion(+), 34 deletions(-) (limited to 'src/tools') diff --git a/src/tools/tqglobal.h b/src/tools/tqglobal.h index f21e0324c..d1e0064b4 100644 --- a/src/tools/tqglobal.h +++ b/src/tools/tqglobal.h @@ -243,11 +243,6 @@ # define mutable /* no template classes in TQVariant */ # define TQT_NO_TEMPLATE_VARIANT -/* Wcc does not fill in functions needed by valuelists, maps, and - valuestacks implicitly */ -# define TQ_FULL_TEMPLATE_INSTANTIATION -/* can we just compare the structures? */ -# define TQ_FULL_TEMPLATE_INSTANTIATION_MEMCMP /* these are not useful to our customers */ # define TQT_NO_SQL # endif @@ -255,9 +250,6 @@ #elif defined(__GNUC__) # define Q_CC_GNU # define Q_C_CALLBACKS -# if __GNUC__ == 2 && __GNUC_MINOR__ <= 7 -# define TQ_FULL_TEMPLATE_INSTANTIATION -# endif /* GCC 2.95 knows "using" but does not support it correctly */ # if __GNUC__ == 2 && __GNUC_MINOR__ <= 95 # define Q_NO_USING_KEYWORD @@ -306,7 +298,6 @@ but it is not defined on older compilers like C Set 3.1 */ #elif defined(__xlC__) # define Q_CC_XLC -# define TQ_FULL_TEMPLATE_INSTANTIATION # if __xlC__ < 0x400 # define Q_NO_USING_KEYWORD # define TQ_TYPENAME @@ -405,7 +396,6 @@ # define Q_CC_HPACC # else # define Q_CC_HP -# define TQ_FULL_TEMPLATE_INSTANTIATION # endif # define Q_NO_USING_KEYWORD /* ### check "using" status */ @@ -842,23 +832,7 @@ TQ_EXPORT const char *tqInstallPathShare(); #endif /* __cplusplus */ -/* - compilers which follow outdated template instantiation rules - require a class to have a comparison operator to exist when - a TQValueList 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 TQ_FULL_TEMPLATE_INSTANTIATION -# define TQ_DUMMY_COMPARISON_OPERATOR(C) \ - bool operator==( const C& ) const { \ - tqWarning( #C"::operator==( const "#C"& ) got called." ); \ - return false; \ - } -#else -# define TQ_DUMMY_COMPARISON_OPERATOR(C) -#endif +#define TQ_DUMMY_COMPARISON_OPERATOR(C) #endif /* TQGLOBAL_H */ diff --git a/src/tools/tqmap.h b/src/tools/tqmap.h index 5f594c068..9b1888856 100644 --- a/src/tools/tqmap.h +++ b/src/tools/tqmap.h @@ -733,13 +733,6 @@ public: void remove( iterator it ) { detach(); sh->remove( it ); } void remove( const Key& k ); -#if defined(TQ_FULL_TEMPLATE_INSTANTIATION) - bool operator==( const TQMap& ) const { return false; } -#ifndef TQT_NO_STL - bool operator==( const std::map& ) const { return false; } -#endif -#endif - protected: /** * Helpers -- cgit v1.2.3