From: Unknown FreeBSD Contributor <> Date: Sun, 2 Feb 2014 02:44:37 +0000 (-0700) Subject: Bug 3954: compile failure in CpuAffinity.cc X-Git-Tag: SQUID_3_4_3~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3eebd00e9cd66a099c3581429ec9c5b9360e60f4;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 *);