tst_qvariant: automate testing of forward_list

...using the SD-6 __has_include macro.

Change-Id: I629e2ad1c8090aba9e86ab9febf6d09a504219f9
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
This commit is contained in:
Marc Mutz 2014-10-20 21:21:12 +02:00
parent 38c2e3d104
commit 11e09a440b

View File

@ -3798,11 +3798,10 @@ struct ContainerAPI<Container, QByteArray>
}
};
// We have no built-in defines to check the stdlib features.
// #define TEST_FORWARD_LIST
#ifdef TEST_FORWARD_LIST
#include <forward_list>
#ifdef __has_include
# if __has_include(<forward_list>)
# define TEST_FORWARD_LIST
# include <forward_list>
Q_DECLARE_SEQUENTIAL_CONTAINER_METATYPE(std::forward_list)
@ -3856,7 +3855,8 @@ struct ContainerAPI<std::forward_list<QString> >
return variant == value;
}
};
#endif
# endif // __has_include(<forward_list>)
#endif // __has_include
template<typename Container>
struct KeyGetter