From d5c53554e5d71e3518a446b634428bb66fc369fd Mon Sep 17 00:00:00 2001 From: Sona Kurazyan Date: Mon, 12 Oct 2020 14:24:07 +0200 Subject: Loosen the requirements on the container passed to QtConcurrent::map* MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Using std::begin() and std::end() forces the user to have const begin() and end() member functions being defined for the passed container. This is because std::declval() returns rvalue which forces the compiler to select std::{begin, end}()(const Container &c) overloads and an test for a presence of const {begin, end}() methods. Change-Id: I9d96d9f73891ece53224f1741a1334500f7b35ad Reviewed-by: Andrei Golubev Reviewed-by: MÃ¥rten Nordheim --- tests/auto/concurrent/qtconcurrentmap/functions.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'tests/auto/concurrent') diff --git a/tests/auto/concurrent/qtconcurrentmap/functions.h b/tests/auto/concurrent/qtconcurrentmap/functions.h index e5090ef03e..aeba794977 100644 --- a/tests/auto/concurrent/qtconcurrentmap/functions.h +++ b/tests/auto/concurrent/qtconcurrentmap/functions.h @@ -159,8 +159,6 @@ public: const_iterator cend() const { return data.cend(); } iterator begin() { return data.begin(); } iterator end() { return data.end(); } - const_iterator begin() const { return data.cbegin(); } - const_iterator end() const { return data.cend(); } bool operator==(const MoveOnlyVector &other) const { return data == other.data; } private: -- cgit v1.2.3