Boost logo

Boost :

From: Daniel Frey (daniel.frey_at_[hidden])
Date: 2002-03-22 04:44:37


Aleksey Gurtovoy wrote:
>
> What do you think?

GCC 2.95.2 thinks, your example code is illegal. It complains about:

g++ -Wall -O2 -ansi -pedantic -o t2 t2.cc
t2.cc: In instantiation of `my<int>':
t2.cc:44: instantiated from here
t2.cc:40: cannot adjust access to `class my<int> operators<my<int>
>::operator ++(int)' in `class my<int>'
t2.cc:38: because of local method `class my<int> & my<int>::operator
++()' with same name
t2.cc: In function `int main()':
t2.cc:48: warning: no `operator ++ (int)' declared for postfix `++',
trying prefix operator instead

I don't know if this is correct, but it seems logical to me.

Regards, Daniel

--
Daniel Frey
aixigo AG - financial training, research and technology
Schloß-Rahe-Straße 15, 52072 Aachen, Germany
fon: +49 (0)241 936737-42, fax: +49 (0)241 936737-99
eMail: daniel.frey_at_[hidden], web: http://www.aixigo.de

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk