diff --git a/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp b/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp index 4264c96745..41a6de214a 100644 --- a/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp +++ b/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp @@ -3798,11 +3798,10 @@ struct ContainerAPI } }; -// We have no built-in defines to check the stdlib features. -// #define TEST_FORWARD_LIST - -#ifdef TEST_FORWARD_LIST -#include +#ifdef __has_include +# if __has_include() +# define TEST_FORWARD_LIST +# include Q_DECLARE_SEQUENTIAL_CONTAINER_METATYPE(std::forward_list) @@ -3856,7 +3855,8 @@ struct ContainerAPI > return variant == value; } }; -#endif +# endif // __has_include() +#endif // __has_include template struct KeyGetter