Topic: Solution to DR 410 disagrees with existing implementations?
Author: caj@cs.york.ac.uk (chris jefferson)
Date: Wed, 11 May 2005 20:59:27 GMT Raw View
The solution to DR 410 adds the definition exact definition of various
operators to stack and queue. It just passes each operator through to
the underlying container, so for example x<=y is implemented as x.c<=y.c
In the rationale, it says:
"There isn't any real doubt about what these operators are supposed to
do, but we ought to spell it out."
Looking at g++ 3.3 & 4.0, icc 8.1, vc++6 and the latest version of
comeau (all the compilers I have access to), it is true they all agree
on how to implement these operators, but they all disagree with the
Defect Report!
All these compilers implement these operators in terms of just < and ==
on the underlying containers (so x<=y is implemented at !(y<x))
I just wanted to check (and sorry if this is a silly question). Was it
intentional for the DR to disagree with most of the existing
implementations?
Chris
---
[ 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://www.jamesd.demon.co.uk/csc/faq.html ]
Author: pcarlini@suse.de (Paolo Carlini)
Date: Mon, 16 May 2005 16:18:43 GMT Raw View
chris jefferson wrote:
> All these compilers implement these operators in terms of just < and ==
> on the underlying containers (so x<=y is implemented at !(y<x))
>
> I just wanted to check (and sorry if this is a silly question). Was it
> intentional for the DR to disagree with most of the existing
> implementations?
Given the operational semantics of container comparison operators -
Table 65 - I disagree about the disagreement ;)
Paolo.
---
[ 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://www.jamesd.demon.co.uk/csc/faq.html ]