Re: Visual C++ Express won't compare object against float in std::upper_bound
tron.thomas@verizon.net wrote:
On Feb 23, 12:51 am, Ulrich Eckhardt <eckha...@satorlaser.com> wrote:
tron.tho...@verizon.net wrote:
[1]http://www.sgi.com/tech/stl/upper_bound.html
If I understand what you are saying, it seems to imply that the GNU
compiler and Borland compiler should have complained about the missing
definitions for operator <,
No. As others already pointed out, it is an extension and if those two
implementations provide similar extensions to that from Dinkumware but do
not require symmetry it is still an extension of which the C++ standard
doesn't require any specific behaviour.
and based on what's required for the STL,
Wait: the documentation I pointed you at is what the STL supports! However,
note that the STL is not part of the C++ standard, although it strongly
influenced it. Those two are separate things!
that it could be considered a bug in those systems that they compiled
successfully with the original code.
I consider it a flaw that those systems did not enforce symmetry. Since it
is an extension, I wouldn't call it a bug though.
Uli