From: Unknown FreeBSD Contributor <> Date: Mon, 27 Jan 2014 02:11:08 +0000 (-0700) Subject: Bug 3954: compile failure in CpuAffinity.cc X-Git-Tag: SQUID_3_5_0_1~399 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=be43726fc35a2da379f4f54905df5fe4c188ed4f;p=thirdparty%2Fsquid.git Bug 3954: compile failure in CpuAffinity.cc Patch written by 'dim [1]' contributor to FreeBSD and imported to Squid under FreeBSD license. see http://svnweb.freebsd.org/ports/head/www/squid33/files/patch-include__Array.h --- diff --git a/src/base/Vector.h b/src/base/Vector.h index 8b083b1cc1..5f430955b0 100644 --- a/src/base/Vector.h +++ b/src/base/Vector.h @@ -42,12 +42,18 @@ #include "compat/assert.h" /* iterator support */ +#include template class VectorIteratorBase { - public: + typedef typename C::value_type value_type; + typedef std::forward_iterator_tag iterator_category; + typedef typename C::pointer pointer; + typedef typename C::reference reference; + typedef typename C::difference_type difference_type; + VectorIteratorBase(); VectorIteratorBase(C &); VectorIteratorBase(size_t, C &); @@ -75,12 +81,13 @@ private: template class Vector { - public: typedef E value_type; typedef E* pointer; + typedef E& reference; typedef VectorIteratorBase > iterator; typedef VectorIteratorBase const> const_iterator; + typedef ptrdiff_t difference_type; void *operator new (size_t); void operator delete (void *);