summaryrefslogtreecommitdiffstats
path: root/src/corelib/concurrent/qtconcurrentmap.h
diff options
context:
space:
mode:
authorJoão Abecasis <joao.abecasis@nokia.com>2011-08-26 13:43:06 (GMT)
committerLiang Qi <liang.qi@nokia.com>2011-09-02 10:46:39 (GMT)
commitca34cc75294e0d2a8bc491a2c679fe8a69cd0408 (patch)
tree5b6bb61a1d32b187755135dde508ca3bb4bd4e5d /src/corelib/concurrent/qtconcurrentmap.h
parent6b1a8129623e3716f2fc075608b260ce7c381fe2 (diff)
downloadQt-ca34cc75294e0d2a8bc491a2c679fe8a69cd0408.zip
Qt-ca34cc75294e0d2a8bc491a2c679fe8a69cd0408.tar.gz
Qt-ca34cc75294e0d2a8bc491a2c679fe8a69cd0408.tar.bz2
Wrap calls to Sequence::push_back
In C++11 push_back is overloaded to support rvalue-references, void std::vector<T>::push_back(const T &); void std::vector<T>::push_back(T &&); so attempting to get the address for push_back is ambiguous. Instead of hardcoding the function signature, the better and more general solution is to allow the compiler to do the required overload resolution itself, also allowing for implicit conversions to take place. Task-number: QTBUG-18996 Done-with: Liang Qi Reviewed-by: Olivier Goffart
Diffstat (limited to 'src/corelib/concurrent/qtconcurrentmap.h')
-rw-r--r--src/corelib/concurrent/qtconcurrentmap.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/corelib/concurrent/qtconcurrentmap.h b/src/corelib/concurrent/qtconcurrentmap.h
index 37a4143..166d5c8 100644
--- a/src/corelib/concurrent/qtconcurrentmap.h
+++ b/src/corelib/concurrent/qtconcurrentmap.h
@@ -271,7 +271,7 @@ OutputSequence blockingMapped(const InputSequence &sequence, MapFunctor map)
return blockingMappedReduced<OutputSequence>
(sequence,
QtPrivate::createFunctionWrapper(map),
- &OutputSequence::push_back,
+ QtPrivate::PushBackWrapper(),
QtConcurrent::OrderedReduce);
}
@@ -282,7 +282,7 @@ typename QtPrivate::MapResultType<InputSequence, MapFunctor>::ResultType blockin
return blockingMappedReduced<OutputSequence>
(sequence,
QtPrivate::createFunctionWrapper(map),
- &OutputSequence::push_back,
+ QtPrivate::PushBackWrapper(),
QtConcurrent::OrderedReduce);
}
@@ -293,7 +293,7 @@ Sequence blockingMapped(Iterator begin, Iterator end, MapFunctor map)
return blockingMappedReduced<Sequence>
(begin, end,
QtPrivate::createFunctionWrapper(map),
- &Sequence::push_back,
+ QtPrivate::PushBackWrapper(),
QtConcurrent::OrderedReduce);
}
@@ -304,7 +304,7 @@ typename QtPrivate::MapResultType<Iterator, MapFunctor>::ResultType blockingMapp
return blockingMappedReduced<OutputSequence>
(begin, end,
QtPrivate::createFunctionWrapper(map),
- &OutputSequence::push_back,
+ QtPrivate::PushBackWrapper(),
QtConcurrent::OrderedReduce);
}