Topic: Does the standard require friend operator== rather than member operator=
Author: "Darin Adler" <darin@bentspoon.com>
Date: 1999/07/27 Raw View
Marco Manfredini wrote:
> Read the stl implementation file you include: <list> to see what happens
> there.
I understood before I posted why the problem occurred on my machine. I read
the <list> header that's included with my compiler. I also spoke to the
library engineer who created that header, and talked to him about tradeoffs
before posting to the list.
But I posted to comp.std.c++ to ask about the *standard*.
Not about the copy of <list> included with my compiler.
Nor about the copy of <list> on your computer.
-- Darin
---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html ]
Author: jpotter@falcon.lhup.edu (John Potter)
Date: 1999/07/28 Raw View
On 27 Jul 99 17:57:07 GMT, "Darin Adler" <darin@bentspoon.com> wrote:
: But I posted to comp.std.c++ to ask about the *standard*.
See 17.3.1.2/3 which states that requirements are specified without
the interface. The example is ++x which may be a member or not.
In particular to the original question about iterators, they are
implementation defined things and nothing is said about how the
requirements are satisfied.
There are some historical reasons involving compilers' abilities to
handle nested classes and templates plus the substandard namespace
for relops behind the usual member function.
For now, take the advice to use (ci == i) and put some pressure on
vendors to provide the non-member versions.
John
---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html ]