From 11e09a440b9b4e80878dc685f9d49d8a43ff6604 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Mon, 20 Oct 2014 21:21:12 +0200 Subject: tst_qvariant: automate testing of forward_list ...using the SD-6 __has_include macro. Change-Id: I629e2ad1c8090aba9e86ab9febf6d09a504219f9 Reviewed-by: Olivier Goffart --- tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'tests') 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 -- cgit v1.2.3