Re: c++ operator << support for debug()()

From: Serassio Guido <guido.serassio@dont-contact.us>
Date: Sat, 12 Jul 2003 12:55:05 +0200

Hi Robert,

At 11.20 12/07/2003, Robert Collins wrote:

>On Sat, 2003-07-12 at 18:42, Serassio Guido wrote:
>
>
> > Interesting, but, please, do you can give an example, I'm not sure to
> > understand how make this right.
>
>in Array.h:
>delete:
>"
>template<class C>
>typename C::value_type & VectorIteratorBase<C>::operator *() const
>{
> return theVector->items[pos];
>}
>
>template<class C>
>typename C::value_type * VectorIteratorBase<C>::operator -> () const
>{
> return &theVector->items[pos];
>}
>"
>
>within the VectorIteratorBase definition, (lines 59 and 60 for me):
>change
>"
> typename C::value_type & operator *() const;
> typename C::value_type * operator -> () const;
>"
>
>to
>
>"
>typename C::value_type & VectorIteratorBase<C>::operator *() const
>{
> return theVector->items[pos];
>}
>typename C::value_type * VectorIteratorBase<C>::operator -> () const
>{
> return &theVector->items[pos];
>}
>"

Thanks, but now I get different errors:

c:\work\nt-3.0\include\array.h(60) : error C2063: '*' : not a function
         c:\work\nt-3.0\include\array.h(75) : see reference to class
template instantiation 'VectorIteratorBase<C>' being compiled
c:\work\nt-3.0\include\array.h(60) : error C2040: '*' : 'generic-type-257
&(void) const' differs in levels of indirection from 'int'
         c:\work\nt-3.0\include\array.h(75) : see reference to class
template instantiation 'VectorIteratorBase<C>' being compiled
c:\work\nt-3.0\include\array.h(60) : fatal error C1903: unable to recover
from previous error(s); stopping compilation
         c:\work\nt-3.0\include\array.h(75) : see reference to class
template instantiation 'VectorIteratorBase<C>' being compiled

And this is the changed source from line 59

     typename C::value_type & VectorIteratorBase<C>::operator *() const
     { <== This is my line 60
         return theVector->items[pos];
     }
     typename C::value_type * VectorIteratorBase<C>::operator -> () const
     {
         return &theVector->items[pos];
     }

// typename C::value_type & operator *() const;
// typename C::value_type * operator -> () const;
     ssize_t operator - (VectorIteratorBase const &rhs) const;
     bool incrementable() const;
   private:
     size_t pos;
     C * theVector;
}; <== This is my line 75

>Uhmm, IIRC MSVC costs a large amount of $$$, whereas mingw is free.
>mingw is also, as I understand it, a better C++ compiler. If the reactos
>project carries on well, gcc will have SEH as well soon (if it doesn't
>already - I'm a little out of date there). I'm not at all sure that the
>MSVC install base is larger than the mingw/cygwin (because it can
>compile for mingw). But thats a different discussion.

I agree totally, but I remember too the VHS / Video 2000 / Betamax fight
for the Video Tape standardization:
the winner was VHS, the worse technology ..... (sigh !)

> > So I think that we should to try to make Squid 3 compatible with MSVC.
>
>Certainly, we'll try.

Thanks for the support !

Regards

Guido

-
========================================================
Guido Serassio
Acme Consulting S.r.l.
Via Gorizia, 69 10136 - Torino - ITALY
Tel. : +39.011.3249426 Fax. : +39.011.3293665
Email: guido.serassio@acmeconsulting.it
WWW: http://www.acmeconsulting.it/
Received on Sat Jul 12 2003 - 04:55:29 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:20:16 MST