10 #include <type_traits> 17 #if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0)) 24 template<
typename S,
typename T>
25 typename std::enable_if<!std::is_void<T>::value, QVector<T>>::type
map(
const std::function<
T(
const S&)>& pFunc,
const QVector<S>& pItems)
27 const auto sz = pItems.size();
28 QVector<T> result(sz);
29 for (
int index = 0; index < sz; ++index)
31 result[index] = pFunc(pItems[index]);
46 template<
typename S,
typename T>
47 typename std::enable_if<!std::is_void<T>::value, QList<T>>::type
map(
const std::function<
T(
const S&)>& pFunc,
const QList<S>& pItems)
49 const auto sz = pItems.size();
51 for (
int index = 0; index < sz; ++index)
53 result.append(pFunc(pItems[index]));
66 typename std::enable_if<!std::is_void<T>::value, QVector<T>>::type
filter(
const std::function<
bool(
const T&)>& pFunc,
const QVector<T>& pItems)
69 for (
const T& item : pItems)
std::enable_if<!std::is_void< T >::value, QVector< T > >::type filter(const std::function< bool(const T &)> &pFunc, const QVector< T > &pItems)
Definition: FuncUtils.h:66
std::enable_if<!std::is_void< T >::value, QList< T > >::type map(const std::function< T(const S &)> &pFunc, const QList< S > &pItems)
Definition: FuncUtils.h:47
Implementation of ActivationContext for Intent based activation on Android systems.
Definition: ActivationContext.h:14
#define T(v)
Definition: http_parser.cpp:237