19#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0))
26template<
typename S,
typename T>
27std::enable_if_t<!std::is_void_v<T>, QVector<T>>
map(
const std::function<
T(
const S&)>& pFunc,
const QVector<S>& pItems)
29 const auto sz = pItems.size();
30 QVector<T> result(sz);
31 for (
int index = 0; index < sz; ++index)
33 result[index] = pFunc(pItems[index]);
48template<
typename S,
typename T>
49std::enable_if_t<!std::is_void_v<T>, QList<T>>
map(
const std::function<
T(
const S&)>& pFunc,
const QList<S>& pItems)
51 const auto sz = pItems.size();
53 for (
int index = 0; index < sz; ++index)
55 result.append(pFunc(pItems[index]));
68std::enable_if_t<!std::is_void_v<T>, QVector<T>>
filter(
const std::function<
bool(
const T&)>& pFunc,
const QVector<T>& pItems)
71 for (
const T& item : pItems)
#define T(v)
Definition: http_parser.cpp:237
Implementation of GeneralAuthenticate response APDUs.
Definition: CommandApdu.h:16
std::enable_if_t<!std::is_void_v< T >, QList< T > > map(const std::function< T(const S &)> &pFunc, const QList< S > &pItems)
Definition: FuncUtils.h:49
std::enable_if_t<!std::is_void_v< T >, QVector< T > > filter(const std::function< bool(const T &)> &pFunc, const QVector< T > &pItems)
Definition: FuncUtils.h:68