Use variadic templates to generalize MapSequenceResultType
This helps us determine the correct result type for std::vector, as that one has two template arguments and would otherwise not get caught here. Change-Id: Ie887088bce25df2cadc8422a4212dc33d57ecfa5 Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io> Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
This commit is contained in:
parent
5646f46ec9
commit
ba1266baec
@ -156,10 +156,10 @@ struct MapSequenceResultType<QStringList, MapFunctor>
|
|||||||
|
|
||||||
#ifndef QT_NO_TEMPLATE_TEMPLATE_PARAMETERS
|
#ifndef QT_NO_TEMPLATE_TEMPLATE_PARAMETERS
|
||||||
|
|
||||||
template <template <typename> class InputSequence, typename MapFunctor, typename T>
|
template <template <typename...> class InputSequence, typename MapFunctor, typename ...T>
|
||||||
struct MapSequenceResultType<InputSequence<T>, MapFunctor>
|
struct MapSequenceResultType<InputSequence<T...>, MapFunctor>
|
||||||
{
|
{
|
||||||
typedef InputSequence<QtPrivate::MapResultType<InputSequence<T>, MapFunctor>> ResultType;
|
typedef InputSequence<QtPrivate::MapResultType<InputSequence<T...>, MapFunctor>> ResultType;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // QT_NO_TEMPLATE_TEMPLATE_PARAMETER
|
#endif // QT_NO_TEMPLATE_TEMPLATE_PARAMETER
|
||||||
|
Loading…
x
Reference in New Issue
Block a user