From 0d4834c171f6c6c561fc5874010f71026ab56c18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Abecasis?= Date: Fri, 26 Aug 2011 15:43:06 +0200 Subject: Wrap calls to Sequence::push_back In C++11 push_back is overloaded to support rvalue-references, void std::vector::push_back(const T &); void std::vector::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 (cherry picked from commit ca34cc75294e0d2a8bc491a2c679fe8a69cd0408) Change-Id: Id271118e489f888905e491dd4cfc3d2db7697552 Reviewed-on: http://codereview.qt-project.org/4642 Reviewed-by: Liang Qi Reviewed-by: Qt Sanity Bot --- .../auto/corelib/concurrent/qtconcurrentmap/tst_qtconcurrentmap.cpp | 5 ----- 1 file changed, 5 deletions(-) (limited to 'tests') diff --git a/tests/auto/corelib/concurrent/qtconcurrentmap/tst_qtconcurrentmap.cpp b/tests/auto/corelib/concurrent/qtconcurrentmap/tst_qtconcurrentmap.cpp index 8ec49accdf..5ed635b800 100644 --- a/tests/auto/corelib/concurrent/qtconcurrentmap/tst_qtconcurrentmap.cpp +++ b/tests/auto/corelib/concurrent/qtconcurrentmap/tst_qtconcurrentmap.cpp @@ -2320,11 +2320,6 @@ void tst_QtConcurrentMap::stlContainers() { #ifdef QT_NO_STL QSKIP("Qt compiled without STL support", SkipAll); -#elif defined(Q_COMPILER_RVALUE_REFS) - //mapped uses &Container::push_back, but in c++0x, std::vector has two overload of it - // meaning it is not possible to take the address of that function anymore. - QSKIP("mapped do not work with c++0x stl vector", SkipAll); -#else std::vector vector; vector.push_back(1); vector.push_back(2); -- cgit v1.2.3