diff options
author | Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> | 2013-09-04 20:46:15 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-09-05 09:48:22 +0200 |
commit | 9fc2c729b4932504ff6344b6547c08b1b24753a0 (patch) | |
tree | cd370fc4de40466cd1974d882f564d648cd4626a | |
parent | c0df6cbe86d331f709887ecef6f40cff52438a4b (diff) |
Make tst_qalgorithms compliant with the Standard
§24.4.1 [iterator.traits] of N3337 makes it *mandatory* to define the
various types
std::iterator_traits<Iterator>::{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 <thiago.macieira@intel.com>
-rw-r--r-- | tests/auto/corelib/tools/qalgorithms/tst_qalgorithms.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
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 <iostream> #include <iomanip> #include <sstream> +#include <iterator> #include <algorithm> #include <qalgorithms.h> #include <QStringList> @@ -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) |