From 9fc2c729b4932504ff6344b6547c08b1b24753a0 Mon Sep 17 00:00:00 2001 From: Giuseppe D'Angelo Date: Wed, 4 Sep 2013 20:46:15 +0200 Subject: [PATCH] Make tst_qalgorithms compliant with the Standard MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit §24.4.1 [iterator.traits] of N3337 makes it *mandatory* to define the various types std::iterator_traits::{value,pointer,...} for any given iterator. §24.4.1.2 makes it enough to define them within our iterator class. Change-Id: I1305c8392d224889b09395e30ecc77b194020a15 Reviewed-by: Thiago Macieira --- tests/auto/corelib/tools/qalgorithms/tst_qalgorithms.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/auto/corelib/tools/qalgorithms/tst_qalgorithms.cpp b/tests/auto/corelib/tools/qalgorithms/tst_qalgorithms.cpp index c18ba4d05c..144bc62b1b 100644 --- a/tests/auto/corelib/tools/qalgorithms/tst_qalgorithms.cpp +++ b/tests/auto/corelib/tools/qalgorithms/tst_qalgorithms.cpp @@ -44,6 +44,7 @@ #include #include #include +#include #include #include #include @@ -846,6 +847,12 @@ void tst_QAlgorithms::qCountContainer() const class RAI { public: + typedef int difference_type; + typedef int value_type; + typedef std::random_access_iterator_tag iterator_category; + typedef int *pointer; + typedef int &reference; + RAI(int searched = 5, int hidePos = 4, int len = 10) : curPos_(0) , length_(len)